http://fancytodo.mhtrmkholis.com
Make sure Node.js is installed in your computer then run these commands:
npm install
npm run dev
PORT=
JWT_SECRET=
GOOLE_CLIENT_ID=
Route | Method | Request(s) | Response(s) | Description |
---|---|---|---|---|
/api/users |
GET | none |
Success200 OKFail 500 Internal Server Error |
Show all users |
/api/users/signup |
POST | Body name: String email: String password: String |
Success201 CreatedFail 500 Internal Server Error |
Create a user |
/api/users/signin |
POST | Body email: String password: String |
200 OKFail 400 Bad Request |
Sign a user in |
/api/users/signin/goole |
POST | Body email: String password: String |
200 OKFail 400 Bad Request |
Sign a user in with google account |
Route | Method | Request(s) | Response(s) | Description |
---|---|---|---|---|
/api/todos |
POST | Headers token: String Body name: String description: String dueDate: Date |
Success201 CreatedFail 500 Internal Server Error |
Create a todo |
/api/todos |
GET | none |
200 OKFail 401 Authorization Error500 Internal Server Error |
Get all todos by authorize user |
/api/todos/:id |
PUT | Headers id: String Body name: String description: String dueDate: Date status: Boolean |
200 OKFail 401 Authorization Error500 Internal Server Error |
Update one todo |
/api/todos/:id |
PATCH | Headers id: String Body name: String description: String dueDate: Date status: Boolean |
200 OKFail 401 Authorization Error500 Internal Server Error |
Update one todo |
/api/todos/:id |
DELETE | Headers id: String |
200 OKFail 401 Authorization Error500 Internal Server Error |
Delete a todo |