Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fintank/node-rest-mongo-jwt
REST API with Node.js and MongoDB using JWT for authentication
https://github.com/fintank/node-rest-mongo-jwt
Last synced: 2 days ago
JSON representation
REST API with Node.js and MongoDB using JWT for authentication
- Host: GitHub
- URL: https://github.com/fintank/node-rest-mongo-jwt
- Owner: FintanK
- Created: 2015-12-31T15:02:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-31T15:08:15.000Z (almost 9 years ago)
- Last Synced: 2023-02-26T21:12:14.333Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Node.js REST API with JWT (JSON web token authentication)
---------------------------------------------------------Note: Make sure your mongodb service is running.
Components
- MongoDB Database
- Node.jsCheck 'package.json' for Node module dependencies
Installation
------------> npm install
Visit http://localhost:3000/setup in your browser to populate the admin user for the database.
Running the application
------------------------In the root directory
> npm install nodemon -g
> nodemon server.js(Changes will reload automatically)
or alternatively
> node server.js
Endpoints
----------GET http://localhost:3000/api
POST http://localhost:3000/api/auth
GET http://localhost:3000/api/usersUseful links
------------Mongodb connection strings - https://docs.mongodb.org/v3.0/reference/connection-string/