Skip to content

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

Notifications You must be signed in to change notification settings

gzzini/mongo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks