A ready to use Express.js solution.
You must duplicate the env file $ cp .env.dist .env
.
Install dependencies from npm (or whatever).
$ make install
Run tests to verify the installation.
$ make test
or $ make test-coverage
Run the project (without Docker)
The project is available on http://127.0.0.1:<PORT>
.
$ make start
Run the project (with Docker)
$ docker build -t alexvndre/express-js-starter-pack .
You can check that your image is listed by Docker with $ docker images
.
$ docker run -p 49160:3000 -d alexvndre/express-js-starter-pack
Check if the image is running with $ docker ps
. You can read the app output with $ docker logs <CONTAINER_ID>
.
If you need to run an app command, $ docker exec -it <CONTAINER_ID> /bin/bash
.
To kill it: $ docker kill <CONTAINER_ID>
.