Skip to content
This repository was archived by the owner on May 7, 2019. It is now read-only.

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API REST boilerplate

node npm mongodb Express MIT License Support me

Boilerplate app to build your own API REST with Node.js, Express and MongoDB.

Getting Started

# 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

Start server

# Development mode (with nodemon support)
npm run dev

# Production mode
npm start

Config file

  • 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

Dependencies

Dev-dependencies

License

MIT © AitorDB

About

Example of API developed with NodeJS + Express

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages