This API aims to be a financial management application, allowing users to perform various operations related to their finances. It provides functionalities such as adding, updating, viewing and deleting financial transactions, categories and user accounts. Additionally, it includes features for user authentication, including the use of API keys for authorization.
To run the API, you need the following dependencies:
- Docker - Containerization platform for developing, shipping, and running applications.
- Node.js - JavaScript runtime environment.
- Express- Web framework for Node.js.
- PostgreSQL - Relational database management system.
To set up the database, follow these steps:
-
Create a PostgreSQL instance using Docker:
docker run --name postgres-finances -e POSTGRES_PASSWORD=docker -e POSTGRES_USER=docker -p 5432:5432 -d -t postgres
-
Create a
.envfile in the project root directory like the example below:db_user=docker db_password=docker db_name=finances db_host=localhost db_port=5432
To run the project, follow these steps:
-
Git clone the repository:
-
Navigate to the project folder and install dependencies:
cd wallet-backend (npm install) cd myapp (npm install)
-
Configure scripts to create the database and tables in PostgreSQL:
npm run config:init
-
Run the project in development mode:
npm run start:dev
-
Or run the project in production mode:
npm run start
To test the API, use Insomnia to import the file below: Insomnia.json
This README provides detailed instructions for setting up the project, configuring the PostgreSQL database, and running the API in development or production mode. Make sure to replace the API_KEY in the with your desired value.