/NodeJS_Mongo_BoilerPlate

CRUD Blog using NodeJS,Express, MongoDB

Primary LanguageJavaScriptApache License 2.0Apache-2.0

NodeJS_Blog_RestAPI

CRUD API using NodeJS, Experss, MongoDB

About

This Repo is for beginners of NodeJS who wants to make a full API service. This repo has a good folder structure. Joi for validation of incoming data. Passport for encrypting passwords.

Prerequisites

Following are the softwares requried to get this api up and running.

Installing

  • Getting the configuration ready
    Copy the .env.example file at the same location and save as .env

    cp .env.example .env
    
  • Create account on MongoDB Atlas and paste the database URL in .env file

  • Create account on Sentry and paste the Sentry DNS into .env file (Only for production to get emails about errors)

  • Install the packages mentioned in package.json file for getting all dependencies of the project.

    npm install --save
    
  • Starting the application

    npm start
    

Testing

Import the file Blog.postman_collection_v2.json into postman for testing API endpoints.

Developers