Wallet Api helps you control your incomes and expenses.
Main Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
Tests Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname-Test"
BASE_URL="http://localhost:9000/api/v1"
PORT="9000"
SERVER_DEV_PORT="9000"
JWT_SECRET="supersecretkey"
EXCHANGE_RATES_API_URL='https://api.exchangeratesapi.io/latest'
EXCHANGE_RATES_API_KEY=""
REDIS_URL="redis://localhost:6379"
base url: http://localhost:9000/api/v1/
/users:
POST - /users/login
POST - /users/register
/transactions/
GET - /
POST - /
PUT - /:id
DELETE - /:id
/analytics/
GET - /balance
GET - /stats
GET - /monthly
/info/
GET - /finance-tips
GET - /average-expenses
/exchange-rates/
GET - /exchange-rates
GET - /report
/swagger -> Swagger Route
-
Clone the repository:
git clone https://github.com/emilmilev1/api-wallet.git cd api-wallet -
Create and populate the
.envfile:cp .env.example .env
Edit the
.envfile and add your own credentials. I have removed mine in that setup. -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to swagger:
http://localhost:9000/api/v1/swagger/docs