Skip to content

ptpavankumar/service-template-with-db-and-ioc-inversify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Service Template With Database (sqlite) and InversifyJS

Setup microservice

npm install

Setup database

npm run dbupgrade

Run in development mode

npm run dev

Publish to public/private registry (NOTE: before publish prepublish will lint and build a package)

npm publish

Database migrations

NOTE: Never place any file that in migrations folder that should not be executed

Database setup commands

Generate upgrade/downgrade scripts for 20170223144325_initial.js for database based on dbcongif.js

knex migrate:make initial --env development --knexfile ./src/config/dbconfig.js

Apply this command to create/upgrade sqlite

knex migrate:latest --env development --knexfile ./src/config/dbconfig.js

Releases

No releases published

Packages

No packages published