a Sails application
- Clone repository:
git clone git@gitlab.cleveroad.com:commercial/vlife/vlife-web-backend.git
- Install dependencies in the root folder of project:
$: npm i
- Create vlife db with utf8_general_ci encoding.
- The local.js file contain configs for your local settings and has priority over other configs.
Also, local.js file added to .gitignore, so next step is prepare the local.js file.
Open ~/config folder, rename local.js.example to local.js and put your configs for db.
Note that DB on this point must be empty. - Install sails-migrations with flag -g:
$: npm i sails-migrations -g
OR: use ~/node_modules/sails-migrations/bin/cli.js locally
Actually, you have to execute next command:
$: sails-migrations migrate
OR
$: node node_modules/sails-migrations/bin/cli.js migrate
- Install sails with flag -g:
$: npm i sails -g
OR use ~/node_modules/sails/bin/sails.js locally
Actually, you have to execute next command:
$: sails l
OR
$: node node_modules/sails/bin/sails.js l
Note that for keeping server alive you should use PM2 or another node proccess manager
Must be pre installed:
- node v6.10.3 or v8.1.0 (both were tested)
- mysql
Optional: - pm2