This is a system where a shareholder will deposit an e-Money , and the system lend them and re-pay with some interest.
https://pesaspace.herokuapp.com/api/v1/
-
Open your terminal
-
Run
git clone https://github.com/victkarangwa/pesaspace-backend.git
OR Download the project
-
Create a
.env
file reflecting to.env.example
file -
Add the values to all environmental variables in
.env
file -
Make sure you have PostgreSQL installed (You can download it here)
Open termin in the directory you clone the repo from:
-
Run
npm install
to install all dependencies -
Using postgres, create database for both dev and testing environment. In your
.env
, database URL should be of this format:DATABASE_DEV_URL=postgres://[user]:[password@[host]:[port/[db_name]
ex:DATABASE_DEV_URL=postgres://postgres:123@localhost:5432/pesaspace_dev
-
Run
npm run db:migrate
oryarn db:migrate
to automatically create all necessary models -
Run
npm run db:seed:dev
oryarn db:seed:dev
to seed data in the database -
Run
npm run dev-server
to start local development server. You can also simulate production server locally by runningnpm start
-
Open your postman and access
http://localhost:<:APPLICATION_PORT>
(by default, the port is3000
) , if app is running correctly, you will get a response with a message:{ status: 200, message: "Pesa Space APIs" }
-
For more, please read Pesa Space API documentation