Boilerplate app to build your own API REST with Node.js, Express and MongoDB.
# Clone this repository
git clone https://github.com/AitorDB/API-NodeJS.git
cd API-NodeJS/
# Install dependencies
npm i
# Execute the config script
# This will set-up your config file
npm run script:config
# Build the project
npm run build
# Execute the db set-up script
# This will create a SuperAdmin user and the default roles
npm run script:db
# Development mode (with nodemon support)
npm run dev
# Production mode
npm start
- DEFAULT_PORT: Port used by default when no ENV port specified
- api
- SECRET_TOKEN: JWT Secret
- rate_limits: Rate limit middleware config
- AUTH
- PRODUCT
- log: Log files path
- ERROR_PATH
- WARN_PATH
- INFO_PATH
- db
- URI: MongoDB connection URI
- email
- API_KEY: Sendgrid API key
- FROM: Email which will appear as sender
- product
- DEFAULT_IMAGE: Default image url
- @sendgrid/mail
- bcrypt-as-promised
- body-parser
- cors
- Express
- express-rate-limit
- helmet
- http-status
- joi
- jwt-simple
- moment
- mongoose
- mz
- pug
- winston
- babel-cli
- babel-eslint
- babel-plugin-add-module-exports
- babel-preset-es2015
- eslint
- eslint-config-google
- eslint-plugin-import
- nodemon
- rimraf
MIT © AitorDB