Basic to-do app with express.js
- Used lowdb as database that stores data in json.
- Really simple authentication but not for production
- For testing there is a user. username:
admin
, password: admin
Installation
$ git clone https://github.com/kadiryazici/basic-express-todo-app-with-auth.git
$ cd basic-express-todo-app-with-auth
$ npm install
$ npm run start
Built-in app to test api.
- Visit /app to test api by app.
API
Type |
Name |
Location |
Body |
Headers |
Returns [{}] |
POST
|
Login |
/login |
username password |
- |
id |
POST
|
SignUp |
/signup |
username password |
- |
id |
POST
|
Add Todo |
/add |
text |
authorization: id |
id isDone text |
POST
|
Delete Todo |
/delete |
id |
authorization: id |
- |
GET
|
Get Todos |
/todos |
- |
authorization: id |
id isDone text |
PUT
|
Update Todo |
/update |
id isDone: Boolean |
authorization: id |
id isDone text |