This is an API created using Node.js, Express and PostgresSQL. The main goal is create an application that controls user finances.
- Node.js
- Docker
- Clone the project
git clone https://github.com/MikaelSouz/wallet-app-backend.git
- Navigate to project folder and Install Dependencies
cd wallet-app-backend
npm install
- Create an Postgres instance no docker
Example:
docker run --name postgres-finances -e POSTGRES_PASSWORD=docker -e POSTGRES_USER=docker -p 5432:5432 -d -t postgres
- Create a .env file following the example:
DB_USER=docker
DB_PASSWORD=docker
DB_NAME=finances
DB_HOST=localhost
DB_PORT=5432
- Run config script to create database and tables:
npm run config:init
Observation: if don't stop CTRL + C
- Run the project in dev version:
npm run start:dev
or
Run the project in final version:
npm run start
Use insomnia to import the file bellow: https://github.com/MikaelSouz/wallet-app-backend/blob/master/Insomnia.json