Skip to content

Commit

Permalink
tambah readme
Browse files Browse the repository at this point in the history
  • Loading branch information
agrha committed Mar 5, 2018
1 parent d634d87 commit 90ebd0c
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# rest-api
REST API with MVC architecture

### AGRHA REST-api

Demo App with basic REST API.

### REST-api

List of basic routes:


| Routes | HTTP | Description |
| ---------------------:|:-------------:| --------------------:|
| /api/hello?name={name}| GET | Print hello,{name}! |

List of user routes:

| Routes | HTTP | Description |
| ---------------------:|:-------------:| ---------------------------------------:|
| /api/users | GET | Get all the users |
| /api/users/:id | GET | Get a single user |
| /api/users/ | POST | Create a user |
| /api/users/:id | DELETE | Delete a user |
| /api/users/:id | PUT | Update a user with new info |
| /api/users/:id | PATCH | Update a user with specific new info |

List of filter routes:

| Routes | HTTP | Description |
| ------------------------:|:-------------:| ---------------------------------------:|
| /api/users?name="{name}" | GET | Get {name} match in users |
| /api/users/:id | GET | Get {na} like in users |


Usage

With only npm:

npm install
npm start
npm run dev

access the website via http://localhost:3000 or API via http://localhost:3000/api

0 comments on commit 90ebd0c

Please sign in to comment.