This is the backend API of a financial control application, where you can register your incomes and outgoings. You can see the frontend project here.
NodeJs
Express
Jest
Supertest
You must have installed node and npm.
First run npm i
to install all dependencies.
Use the dump sql script to create your database structure.
Dump SQL script here.
And then create a .env.test file following as an example the .env.test.example file, setting the environment variables accordingly with data from your database.
The .env.test.example file here.
In the project directory, you can run:
Runs the app in the production mode.
Open http://localhost:PORT, using the PORT that you have configured at .env.test file to view it in the browser.
Runs the app in the development mode.
Open http://localhost:PORT, using the PORT that you have configured at .env.test file to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the sequencial mode.
Launches the test runner in the interactive watch mode.
This api is deployed on Heroku, you can visit it by accessing this url.
Recives a JSON with name, email and password. The name must be greater than 3 caracters, the email must be valid and the password must have at least 8 characters, containing number, special character, upper and lower case letters.
Receives a JSON with email and password and returns a Bearer token if login is successful.
Receives a header authorization with a valid Bearer token.
Receives a JSON with userId, type, value and description. Besides that, receives a header authorization with a valid Bearer token.