Skip to content

Commit f590b61

Browse files
committed
Updates README.md file
1 parent a876824 commit f590b61

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

README.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ Start server in development mode
5353
npm run start:dev
5454
```
5555

56+
## Running the tests
57+
Run the unit and integration tests using the command
58+
```node
59+
npm test
60+
```
61+
5662
## Built With
5763

5864
* [Express](https://expressjs.com/) - Express
@@ -62,32 +68,40 @@ npm run start:dev
6268

6369
## API Endpoints
6470

65-
versioning for the endpoints
66-
/api/
71+
### Versioning for the none auth endpoints
72+
* `/api/`
73+
74+
* Use `http://127.0.0.1:8001` as the base URL for the endpoints
6775

6876
## API Documentation
6977
[Postman API Documentation](https://documenter.getpostman.com/view/6831940/SVYtNdfm)
7078

71-
| Method | Route |
72-
| ------------- | ------------- |
73-
| POST | http://127.0.0.1:8001/auth/signup |
74-
| POST | http://127.0.0.1:8001/auth/login |
75-
| GET | http://127.0.0.1:8001/api/todos |
76-
| POST | http://127.0.0.1:8001/api/todos |
77-
| GET | http://127.0.0.1:8001/api/todos/1 |
78-
| PUT | http://127.0.0.1:8001/api/todos/1 |
79-
| DELETE | http://127.0.0.1:8001/api/todos/1 |
80-
| POST | http://127.0.0.1:8001/api/todos/1 |
81-
| PUT | http://127.0.0.1:8001/api/todos/1/items/2 |
82-
| DELETE | http://127.0.0.1:8001/api/todos/1/items/2 |
83-
84-
### Hosted on Heroku
79+
80+
| Method | Description| Route |
81+
| ------------- | ------------- | ------------- |
82+
| POST | Sign up | `/auth/signup` |
83+
| POST | Log in | `/auth/login` |
84+
| PATCH | Update password | `/api/users/:userId` |
85+
| GET | Get all todos | `/api/todos` |
86+
| POST | Create a todo | `/api/todos` |
87+
| GET | Get a specific todo | `/api/todos/:todoId` |
88+
| PUT | Update a specific todo | `/api/todos/:todoId` |
89+
| DELETE | Delete a specific todo |`/api/todos/:todoId` |
90+
| POST | Create a todo item | `/api/todos/:todoId/items` |
91+
| PUT | Update a todo item | `/api/todos/:todoId/items/:todoItemId` |
92+
| DELETE | Delete a todo item | `/api/todos/:todoId/items/:todoItemId` |
93+
94+
## Hosted on Heroku
8595
[Heroku Link](https://todos-node-app.herokuapp.com/)
8696

87-
### Notes
97+
## Notes
8898

8999
All routes apart from `auth/login` and `auth/signup` require Authorization using a JSON Web Token
90100

101+
Add an authorization header with the token
102+
103+
`'Authorization': 'Bearer token'`
104+
91105
## Author
92106

93107
* **Ryan Simiyu**

0 commit comments

Comments
 (0)