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.
npm i //install packages locally
docker-compose up -d postgres_cont //start the postgres container
npm run test // run tests locally Clone the repo
git clone https://github.com/Sudheer121/LoanManagementSystemRCU.gitInstall 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:migrateSeed/Populate the database
npx sequelize-cli db:seed:allRun sample tests
npm testStart the server
node index.js
- 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.