This is a simple assignment to monitor the tasks like JIRA.
node node_modules\db-migrate\bin\db-migrate create <table_name>
node node_modules\db-migrate\bin\db-migrate up
node node_modules\db-migrate\bin\db-migrate <file_name>
- Create the DB using
CREATE DATABASE 'spak_task_assignment'
, then import themigration.sql
file in MySQL, which is under scripts folder - Use the DB credentials or change that in
index.ts
underconfigs/env
folder
- Install typescript, as this project build on it -
npm install -g typescript
- Install neccessary packages under project folder -
npm install
- Open the project using VS code IDE
- Open the
server.ts
file in the IDE, as it is the project initiate file - Select
Start Debugging
from theRun
option of the Top Menu or useF5
, to run the project in debug mode
- Install
tsc
- for compile and convert typescript to js file andpm2
- for start the project like servernpm install -g pm2
npm install -g tsc
- Install neccessary packages under project folder -
npm install
- Compile typescript source file to js file by typing tsc under project folder, it will generate compiled js files under
dist
folder - Start the poject under
dist
folder using -pm2 start server.js
(use the postman / front end to access this application) - To stop the server -
pm2 stop server.js