npm install
database-setup.sh
npm start
If the database is run on the standard port 5432 on localhost, you need to configure only the following variables:
LB_DB_USER
- database username LB_DB_PASS
- database password LB_DB_NAME
- database name Further, the following environmental variables are recommended to be set before running the code.
LB_DB_HOST=databasehost
LB_DB_USER=username
LB_DB_PASS=password
LB_DB_PORT=databaseport
LB_DB_NAME=databasename
INPUT_LOGS_PATH=pathtoinput
SECRETS_FILE_PATH=pathtosecretsfile
RESET_LOGS=true / false
ACCESS_LOG_ONLY=true / false
An easy way to do so is include them in exactly this manner in a .env
file in the main project directory.
Secrets file offer an alternative to environmental variables described above. The path to the secrets file does not need to be specified unless it is used. If so, it has to be passed as an environmental variable named SECRETS_FILE_PATH.
To see debug logs define DEBUG=*
environmental variable.
Install pre-commit (http://pre-commit.com/) and execute
pre-commit install
Run and fix
npm run lint
Initial:
pm2 deploy pm2.json ufal-point-dev setup
pm2 deploy pm2.json ufal-point-dev
create-admin-account.sh
Adds a new user with admin privileges.
sh create-admin-account.sh PORT DBNAME USERNAME PASSWORD
fill-database.sh
Adds some user-related data do the database.
sh fill-database.sh PORT DBNAME