A backend built with Node.js with development and production settings using docker-compose.
REST-API backend implementing CRUD operations using Nest and Mongodb. In development mode, the backend uses a very simple in-memory storage implemented with array-simple-query.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# watch mode
$ docker-compose -f docker-compose-dev up runbackend.
# production mode
$ build-image.sh
$ docker-compose up
# unit tests
$ docker-compose -f docker-compose-dev.yml up unittest
# e2e tests
$ docker-compose -f docker-compose-dev.yml up e2etest
File | Description |
---|---|
./Dockerfile |
Docker recipe to create the production image to run the application. |
./build-image.sh |
Script to build the production image,to be used, for example, in a continous integration workflow. |
./docker-compose.yml |
docker compose to spin up the backend and mongodb in production mode. |
./Dockerfile-dev |
Docker recipe to create an image with extra libs for development. |
./docker-compose-dev.yml |
docker compose to buid, run and test the application in development. |
./src/developers/repositories/developers.mem.respository.ts |
in-memory repository interfaces with service layer. |
./src/developers/repositories/developers.mongo.respository.ts |
mongo reposistory interfaces with service layer. |
--- | --- |
- Author - Carlos Viol Barbosa
Nest is MIT licensed.