SMontiel / final-capstone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup

Install dependencies.

npm install

Setup dotenv (environment vars).

Copy the file .env.example to .env

cp .env.example

Remplace the values of the vars in the .env file.

Run project.

npm start

Endpoints

  • [get] /
  • [post] /login
  • [get] /_health
  • [get] /cidr-to-mask?value=${cidr}
  • [get] /mask-to-cidr?value=${mask}

How to run with Docker

Getting the image

Building locally

Open a terminal in this directory, then run the following command:

docker build --tag smontiel/academy-sre-bootcamp-salvador-montiel:latest ./

From Docker Hub

Open a terminal, then run the following command:

docker pull smontiel/academy-sre-bootcamp-salvador-montiel:latest

Running

docker run -p 8000:8000 --rm -it smontiel/academy-sre-bootcamp-salvador-montiel:latest

Now, go to: http://localhost:8000/

About


Languages

Language:HCL 67.5%Language:JavaScript 31.1%Language:Dockerfile 0.9%Language:Shell 0.5%