EV Onboarding Exercise
- Docker desktop
- nvm (for local development - optional)
- Node v14.x or later for local development - optional)
- npm for local development - optional)
- In your terminal, checkout this repo by running
git clone git@github.com:ev-rvs/nodejs-server-exercise.git. - Then go into the project's docroot by running
cd nodejs-server-exercise. - Copy
env.exampleas.envand update.envfile with postgres initialization variables. Whichever you wish to set them to. - Go to
http:localhost:3003/and you should see JSON response{ "message": "I'm healthy" }, as a HTTP status code of200. - There are 2 addtional endpoints:
http:localhost:3003/pingrecords this event and responds with{ "message": "PONG" }, as a HTTP status code of200.http:localhost:3003/pongresponds with{ "message": "PONG", "pingCount": X }, as a HTTP status code of200.
- If you've run this project before or are updating it with the latest changes, you may want to purge the old volumes with the command:
docker volumes prune(optional) - Also if you have built this project before you may want to take down the existing containers by running
docker-compose down - Then if you wish to run test containers, you can run
docker-compose -f test-docker-compose.yml upor if you want to continue with development on the project, you can use this as your test driven development containers. - To restart the docker-compose group, you should run
docker-compose down -v && docker-compose up --buildoptionally with-das a daemon or without for running logs to container.