Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 2.3 KB

README.md

File metadata and controls

83 lines (58 loc) · 2.3 KB

README

What is this?

Boilerplate/Generator/Starter Project for building RESTful APIs and microservices using Node.js, Express and MongoDB

API Documentation

You can view api documentation here or view how to generate docs below in "Getting started" section.

Change log

Changelog is located in root folder in file CHANGELOG.md

Features

  • NoSQL database: MongoDB object data modeling using Mongoose
  • Authentication and authorization: using passport
  • Users management: complete CRUD
  • Validation: request data validation using Joi
  • Logging: using morgan and winston
  • Error handling: centralized error handling mechanism
  • API documentation: with apidoc
  • Dependency management: with npm
  • Environment variables: using dotenv
  • Security: set security HTTP headers using helmet
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • File upload: with multer
  • Compression: gzip compression with compression
  • Image compression: with sharp
  • Linting: with Prettier

Requirements

Getting Started

Clone the repo and make it yours:

git clone --depth 1 https://martinstefanovic@bitbucket.org/itc-solution/nodejs-sandbox.git
cd nodejs-sandbox
rm -rf .git

Install dependencies:

npm i

Set environment variables:

cp .env.example .env

Running Locally

npm run dev

Running in Production

npm start

Generate documentation

# generate and open api documentation
npm run docs
# just open generated documentation
npm run open-docs

License

MIT License - Martin Stefanovic