- Node 7.6 or better.
Note: Node with support for async/await.
- Visual Studio Code
$npm installInstall pm2 and configure ecosystem.json with your configuration
$npm install -g pm2
pm2 start ecosystem.json
pm2 logs --lines 100
Edit enviroment.ts with your configuration, or set all enviroments variables before execute.
$npm run start
$npm run startTo configure the enviroment just define env as enviroment variable of node and set the value of STAGES emun.
$npm run test$npm run build
$pm2 start ecosystem.jsonTo provide a common errors for HTTP request.
Use ecosystem json provide a better manage of app configuration
{
"apps" : [
{
"name" : "app-base",
"script" : "backend.js",
"merge_logs" : true,
"cwd" : "absolute path to dist/server",
"env" : {
"NODE_ENV": "prod"
}
}
]
}