Microservice for building titans.
curl localhost:3000to see it up and running.
- Change code.
The root directory is mounted into the container and
nodemon is running. So any changes to the code or packages installed are auto-loaded and reflected in the container. The
docker-compose.yml can be extended to link to other containers, if needed.
yarn prettyto format your code.
yarn lintto lint your code.
yarn jestto perform the jest tests.
yarn flowto check for type errors.
yarn testto check for lint, type, and test errors.
In development mode,
localhost:5858 is exposed for remote Node.js debugging.
docker-compose -f docker-compose.test.yml up to test things locally in the container or use this in a Docker Cloud Autobuild or extend the compose file to include other services and run integration tests.
Or, if the container can stand alone, build the container and run the container passing in the
NODE_ENV=test environment variable, before deploying your container somewhere or running end-to-end tests.
docker build -t dockerized-node .
docker run -e NODE_ENV=test dockerized-node
Dockerfile to meant to be production friendly. The
NODE_ENV environment variable is set to
production and the user has been changed from root.