Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.
/ API-NodeJS Public archive

Example of API developed with NodeJS + Express

License

Notifications You must be signed in to change notification settings

AitorDB/API-NodeJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published