Files
dougal-software/lib/www/server
D. Berge 2486cb3944 Monitor for disconnection from DB.
The events listener now listens to the 'end' event from
the PostgreSQL driver and will attempt to reconnect if
we get disconnected.
2020-10-06 19:22:56 +02:00
..
2020-10-04 03:49:04 +02:00
2020-10-06 18:34:33 +02:00
2020-09-13 17:30:25 +02:00
2020-10-06 19:22:56 +02:00
2020-10-04 20:17:49 +02:00
2020-10-04 20:17:49 +02:00
2020-08-08 23:59:13 +02:00

Dougal web server

Backend server for the user interface

Install

Clone / copy this directory to the destination directory and then run

npm install

Run

In production this should be run as a system service, but for development or a one-off run:

node index.js

or

npm start

Options

The following environment variables affect the behaviour of the application:

  • NODE_ENV: If NODE_ENV=test some output messages are suppressed.
  • HTTP_PORT: Port to listen on. Default is 3000.
  • HTTP_PATH: Path to prepend to the API routes. Default is null.
  • DOUGAL_API_CONFIG: Location of the API configuration file. Default is $HOME/etc/www/config.json.

The server always listens on 127.0.0.1. Use a proxy like Nginx to expose it to the network.