Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 1.51 KB

README.md

File metadata and controls

67 lines (55 loc) · 1.51 KB

LoanManagementSystemRCU

Setup with Docker

This docker compose has two containers, the node application and postgres:13.

docker-compose build
docker-compose up 

After docker compose, the app container is available externally on machine port 8080 and database container is externally available on machine port 2345.
While running the app container it automatically sets up migration and seeds the db using shell script entrypoint.sh.

Testing postgres container from outside

npm i  //install packages locally 
docker-compose up -d postgres_cont //start the postgres container 
npm run test // run tests locally 

Setup without Docker

Clone the repo

git clone https://github.com/Sudheer121/LoanManagementSystemRCU.git

Install packages

npm install 

Convert .env.example to .env

cp .env.example .env  

Start an empty Postgres db with name rcu

Run migrations

npx sequelize-cli db:migrate

Seed/Populate the database

npx sequelize-cli db:seed:all

Run sample tests

npm test

Start the server

node index.js

Code Features

  • Multiple roles for accessing apis i.e customer, agent, admin.
  • API authorization according to roles added
  • Tests added with jest
  • Seeds added for quick start
  • MVCS architecture in NodeJs
  • DAO layer inside services, can be improved.