- Download and install LTS Node.js
- Download, install and run MongoDB 4.4.3 or higher
- Or you can use MongoDB Atlas.
- Move to server directory (if you are in the root directory)
cd server
- Install dependencies
npm i # or yarn
- Set your custom environment variables (copy example env)
cp .env.example .env
- Run seeding migrations
npm run migrate:up # or yarn migrate:up
- Start dev version
npm run dev # or yarn dev
Set NODE_ENV=production
npm run start # or yarn start
You can run integration API tests
npm run test # or yarn test
- express is a minimal and flexible Node.js web application framework.
- nodemon is a utility for monitoring any changes in your source and automatically restarting your server.
- dotenv is a zero-dependency module that loads environment variables. It uses The Twelve-Factor App methodology.
- body-parser is Node.js body parsing middleware.
- mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.
- yup is a schema builder for runtime value parsing and validation.
- migrate-mongo is a database migration tool for MongoDB running in Node.js.
- faker - generate massive amounts of fake data in the browser and node.js. But now you need to use this correct version - 5.5.3.
- jest is JavaScript Testing Framework.
- supertest. HTTP assertions made easy via superagent.
- coveralls can get the great coverage reporting.
- swagger-ui-express. This module allows you to serve auto-generated swagger-ui generated API docs from express, based on a swagger.json file. The result is living documentation for your API hosted from your API server via a route.
- swagger-jsdoc. This library reads your JSDoc-annotated source code and generates an OpenAPI (Swagger) specification.
- cors is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
- helmet helps you secure your Express apps by setting various HTTP headers.
- xss-clean is a middleware to sanitize user input coming from POST body, GET queries, and url params.
- express-mongo-sanitize is a middleware which sanitizes user-supplied data to prevent MongoDB Operator Injection.
- eslint-plugin-security is ESLint rules for Node Security.
- winston is designed to be a simple and universal logging library with support for multiple transports.
- morgan is HTTP request logger middleware for node.js
- yup-phone is yup phone validator using google-libphonenumber.
- http-status is a utility to interact with HTTP status codes.