https://github.com/samparsky/restful-api-expressjs-nodejs-demo
This is a restful api built with NodeJS, ExpressJS and testing with Jasmine and frisby
https://github.com/samparsky/restful-api-expressjs-nodejs-demo
demo expressjs nodejs restful-api
Last synced: 2 months ago
JSON representation
This is a restful api built with NodeJS, ExpressJS and testing with Jasmine and frisby
- Host: GitHub
- URL: https://github.com/samparsky/restful-api-expressjs-nodejs-demo
- Owner: samparsky
- Created: 2017-02-15T18:53:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T19:47:58.000Z (over 8 years ago)
- Last Synced: 2023-10-26T11:51:41.638Z (over 1 year ago)
- Topics: demo, expressjs, nodejs, restful-api
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
**Simple Restful Api Node JS application**
To start the application run
````
npm install
npm start````
**Description**
This is a simple application.
The application is uses json web token to authenticate users after login.To test the application download the postman collection import to postman then
run the application and test**API Documentation**
Base url : http://localhost:3000
````
Company
--------------------------
GET /company/
Params : size, team
Description :
To enable a user have acess to the company /GET a valid
x-access-token must be present and is generated when user login
e.g.
http://127.0.0.1:3000/v1/company/?sort_by=team&size=1
--------------------------
POST /company/
Description : Only the admin is allowed to perform this tasks
Params: name, description, year_founded, contact_name,
contact_email, num_employees
Headers : x-access-token
--------------------------
PUT /company/
Description : Only the admin is allowed to perform this tasksParams: company_id, other optional params
Headers : x-access-token
--------------------------
DELETE /company/
Description : Only the admin is allowed to perform this tasks,
params: company_id
Headers : x-access-token
````Users
````
Users
-------------------------GET /users/
Params: size-------------------------
POST /users/
Params: first_name, last_name, email, password-------------------------
````
**Test**To run the tests
`npm test`