POST /sign-up
{
name: String, at least 3 characters,
email: String, at least 5 characters, must be a valid email,
password: String, at least 8 characters, does not differentiate upper and lower cases,
}None, this is a public route- 400: You have sent a invalid body or your body does not match the criteria,
- 409: This email is already registered
- 201: Account createdPOST /sign-in
{
email: String, at least 5 characters, must be a valid email,
password: String, at least 8 characters, does not differentiate upper and lower cases,
}None, this is a public route- 400: You have sent a invalid body or your body does not match the criteria,
- 404: This email is not registered
- 401: Invalid password
- 200: Logged successfullyGET /transactions
{
headers: {
authorization: Bearer token
}
}- 401: You are not logged or your token is invalid
- 200: Success{
transactions: Array;
}POST /transactions
{
value: String, at least 1 character,
description: String, at least 5 characters,
type: String, must be either 'input' or 'output',{
headers: {
authorization: Bearer token
}
}- 400: You have sent a invalid body or your body does not match the criteria,
- 401: You are not logged or your token is invalid
- 200: Successgit clone https://github.com/bruch0/myWallet-API.git
cd myWallet-API
npm i --force
Create a .env.dev file and fill it using your environment variables following this example
sudo su postgres
psql
CREATE DATABASE mywallet
\c mywallet
Copy everything in the dump.sql file and paste on the terminal
You can not exit the postgres admin, and run
npm run dev
Create a .env.test file and fill it using your environment variables following this example
sudo su postgres
psql
CREATE mywallet_test;
\c mywallet_test
Copy everything in the dump.sql file and paste on the terminal
You can not exit the postgres admin, and run
npm run tests
You can check the server running on heroku here!