Wiki

Setting development environment

  1. Install Python 3
  2. Clone from git
    $ git clone https://repository.cs.ru.is/git/vrpsychlab-backend-signal-processor.git
    
  3. Windows - Create virtual environment and install dependencies
    cd vrpsychlab-backend-signal-processor
    py -3 -m venv venv
    venv\Scripts\activate
    pip install -r requirements.txt
    

todo ----------------------------------------------------------------------------------------------
finish >

Run application with nodemon (development environment)

$ nodemon ./server.js

Deployment

API url: https://secom-dev.ru.is:8081

Backend application is run via pm2 process manager which ensures application restart in case of crash.
Environment variables for development and production environment are placed in /config folder. Configuration is loaded by using /psychlab-backend.json file while starting backend instance.

Git user account for deployment

SSH user account for deployment

Commands for local development environment

The following commands are run from the development machine

Note Windows users - If deploy commands end with "Error: Callback was already called." try to use Git Bash.

Setup deployment on secom-dev

$ pm2 deploy psychlab-backend.json production setup

Deploy app to secom-dev

$ pm2 deploy psychlab-backend.json production

Revert to [n]th last deployment

$ pm2 deploy psychlab-backend.json production revert [n]