npm install
You need to have docker installed https://docs.docker.com/v17.09/docker-for-mac/install/
Copy the contents from .env.example to .env
Open a new terminal tab and run:
npm run db:start
npm run db:createMigration <migration_name>
npm run db:createMigration create_post
Doing so would create a migration file in database/migrations.
Update the up and down objects to define the creation and rollback operations respectively.
npm run db:migrate
npm run db:rollback
After running the db Login to adminer http://localhost:8081/
config # configuration related stuff
src
│ server.ts # App entry point
└───database # Contains migrations and db related code
└───models # Database models
└───domain # Domain level entities
└───entities # Interfaces for domain entities
└───services # All the business logic is here