Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 906 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 906 Bytes

MONGO-API

This is a NodeJS based REST API system and works with mongodb

Install:

git clone https://github.com/jaysixnine/mongo-api
cd mongo-api
npm install

Before Start:

Create a "database" directory under /src and an index.js file

The src/database/index.js should contain:

const mongoose = require('mongoose');
mongoose.connect(`mongodb+srv://<username>:<password>@<database>.qbogc.mongodb.net/<databaseName?retryWrites=true&w=majority`); // if your mongodb is running on cloud
mongoose.connect(`mongodb:localhost/<databaseName>`) // if your database is running locally
mongoose.Promise = global.Promise;
module.exports = mongoose;

This project contains:

Registration with method POST (accept json type)


Authenticate system with token on header


Integration with mongodb


License: MIT