Run npm install
or npm i
to install dependencies
PORT
LOG_LEVEL
- This should be info
NODE_ENV
- This should be development
or what ever environment you want to work on.
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
DB_PORT
JWT_SECRET
Run npm run make-js
name of make-file
to create a migration.
The knex file associated to this command is a .js file because Knexjs is still having issues getting the .ts knex file to be stable on the latest version it released while this project was created.
However, there is a migration of the user table in the migration folder
Run npm run migrate-js
to migrate to the latest migration.
Run npm run rollback-js
to rollback migration.
Run npm run seed:make-js
to generate a seed Template which a user would update to seed Table(s) in the Database.
Run npm run seed:run-js
to seed Table(s) in the Database.
Run npm run waste
to rename knexfile.js. This would allow KnexJS to use knexfile.ts in the app.
Run npm run revamp
to rename knexfile.ts. This would allow KnexJS to use knexfile.js in the app.
Run npm run module
module name
to generate a module.
A module comprise of the following file(s):
- module_name.controller.ts
- module_name.data.ts
- module_name.service.ts
- module_name.validators.ts
Run npm run model
model name
to generate a model.
A model comprise of the following file(s):
- model_name.model.ts
Run npm run dev
to start application in development mode (windows OS).
Run npm run dev:mac
to start application in development mode (Mac OS).
The Mac OS command is to enable Debug log as expected.
Run npm run prod
to build app for production.
Run npm start
to start the application.
Run npm run test
to run application test coverage.