This project was build with Nest framework version 9.
This project has been developed using npm
as a package manager. I should work with other package managers (such as yarn or pnpm...). Run the following command to prepare you project to be run.
$ npm install
The app needs to connect to a MongoDB instance in startup (default port 27017).
You may want to run docker run --name mongodb -d -p 27017:27017 mongo
to do have such an instance before starting the app.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Run npm run build
to build the project. The build artifacts will be stored in the dist/
directory.
A Dockerfile
file has been added to prepare get the project ready to be run in any environment.
$ docker build -t cataloger_backend .
$ docker run --name cataloger_backend -p 3000:3000 cataloger
A docker-compose.yml
can make the task even easier:
$ docker-compose up
In order to run this project along with the FE side (called cataloger
) another docker-compose
file has been added.
Retrieve the parent-docker-compose.yml
and place it in a parent folder:
.
|-- parent-docker-compose.yml
|-- cataloger/
|-- cataloger_backend/
docker-compose -f parent-docker-compose.yml up