Skip to content

zeeamber/easy-inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy-inventory

REST API for mobile applications using Node.js and Express.js framework with Mongoose.js for working with MongoDB. For access control this project use OAuth 2.0, with the help of OAuth2orize and Passport.js.

Running project

You need to have installed Node.js and MongoDB

Setup project

To setup project enter project folder and run following command:

sh setup.sh

Make Requests

Creating User and Client:

http POST http://localhost:3000/users/register  username=user1234 password=abc1234
http POST http://localhost:3000/clients/register  name=androidClient clientId=client2645

Creating and refreshing access tokens:

http POST http://localhost:3000/oauth/token grant_type=password client_id=client2645 client_secret=your_client_secret username=user1234 password=abc1234
http POST http://localhost:3000/oauth/token grant_type=refresh_token client_id=client2645 client_secret=your_client_secret refresh_token=REFRESH_TOKEN

Adding a new product:

http POST http://localhost:3000/api/products accessToken=Your_Access_Token title='OnePlus One' description='Sandstone Black, 64 GB' price=2190 quantity=150

Refer API Documentation to know about more APIs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published