Node, Docker and docker-compose for development. This is a template for prototyping or building small to medium sized projects.
- Start database
$ docker-compose up
- Run server
# remember to setup .env
$ cd server && npm i && npm run start:dev
# check localhost:3000
- Run client
# remember to setup .env
$ cd client && npm i && npm start
# check localhost:8080
- Build image
Build the image using docker-compose
. Note: update the .env
to use database host as db
(the same as the database container name).
$ docker-compose -f docker-compose.prod.yml build
- Build frontend
$ cd client && npm run build
- Run
$ docker-compose -f docker-compose.prod.yml up
# check localhost:80
Use Jest for testing. Create test files with *.test.js
extensions.
This project is licensed under the MIT License - see the LICENSE file for details
- update README
- add linter
- fix tests and travis CI