Before start project we need configure db connection and other security keys.
Application uses node-config module which help override default configs.
To override local configuration we need to create file APP/config/local.json and override keys from APP/config/default.json file.
Example of local.json:
{
"database": {
"url": "sqlite:///www/tmp/db.sqlite"
}
}An application uses yarn as dependencies manager. To install dependencies we can following command:
yarn installBefore start application, we need to make sure DB has the last schema. Migrations apply on DB following command:
yarn migrateFor starting an application in development mode we need run following command:
yarn start:devFor starting an application in production mode we need run following command:
yarn start:prodTo start application in docker we need copy env-file APP/docker/.env.example to APP/docker/.env and edit APP/docker/.env file.
After edit env-file to start an application run following command:
docker-compose upTo start application using pm2 we need run following command:
# development mode (default)
pm2 start app.json
# production mode
pm2 start app.json --env production