The main idea of this project is from jadi. he made a video series named bestoon and made a simple api for daily incomes and expenses using Django. so I decided to make an api like his, but using NodeJS! and here we go!
this project is not complete yet and is under construction!
- first, you must install mongodb and start it's service
systemctl start mongodb(listening on Default port 27017 ) - simply clone this repo
- run
npm installin project directory to install dependencies. - remember to change your
secretinconfig.jsfile. npm startto start the server
| route (path) | method | parameters | requires token |
|---|---|---|---|
| / | GET | - | No |
| /register | POST | name (optional), email (required), password (required) |
No |
| /login | POST | email (required), password (required) |
No |
| /users | GET | - | No |
/delete/userId |
DELETE | - | No |
| /income | GET | - | Yes |
| /income | POST | explain (required), meghdar (required) |
Yes |
| /expense | GET | - | Yes |
| /expense | POST | explain (required), meghdar (required) |
Yes |
/income/incomeId |
GET | - | No |
/income/incomeId |
PUT | explain (optional), meghdar (optional) |
Yes |
/income/incomeId |
DELETE | - | Yes |
/expense/expenseId |
GET | - | No |
/expense/expenseId |
PUT | explain (optional), meghdar (optional) |
Yes |
/expense/expenseId |
DELETE | - | Yes |
The paths
/usersand/delete/userIdare for testing purposes and will be removed.
list of things that will be added:
- a simple UI for the API
- a simple mobile app (maybe using ionic)