A server for the personal overhead expenses app.
The purpose of this project is to make my life easier and practice building a simple CRUD web app with the following feautures:
- input validation
- simple authentication
- sending automatic emails
- using confirmation links with randomly generated approve tokens
/status
GET → returns{running:true}
, used to ping server to wake up/auth
POST → expects{username:string,password:string}
and returns a JSON Web Token if authentication is successful/reports
GET (requires authentication) → returns an array of approved reports/reports
POST (requires authentication) → expects a proper report format, generates metadata, saves unapproved report to database and returns a message/reports/:id/approve
GET → expects report id and matching?t=<approveToken>
, approves the report and returns a message
- Express with Body-Parser
- Mongoose
- Dotenv
- JSON Web Token (JWT) for authentication
- Nodemailer
- Randomstring for approve token creation