This project uses or depends on software from
- NodeJS https://nodejs.org/
- Express https://github.com/expressjs
- MongoDB
- PM2 http://pm2.keymetrics.io/
- Mongoose.js https://mongoosejs.com
This project uses the following Style Guidelines
.
├── src # Source files (This is where the API resides)
├── test # Automated tests (This is where the API tests reside)
├── LICENSE
└── README.md
.
├── ...
├── src # Source files (This is where the API resides)
│ ├── controller/ # All API logic resides here.
│ ├── model/ # All Mongoose Schemas, models, and database logic.
│ ├── middleware/ # Authentication middleware resides inside this folder.
│ ├── routes.config.js # This is where routes get created and get tied back to their specific controller.
│ └── index.js # Where everything begins.
└── ...
This assumes the latest node
and npm
are installed.
cd cve-services
npm install
Install MongoDB locally
Download MongoDB Compass (MongoDB GUI)
In order to start a dev enviorment:
npm run start:dev
This project uses the following for unit testing
Before running the unit tests, change the NODE_ENV
variable in the .env
file from dev
to test
.
Use the following command to run the unit tests:
npm run start:test
To view logs:
pm2 logs
To stop the server
pm2 stop all