Files
dougal-software/lib/www/server
D. Berge 83be83e4bd Check database schema compatibility.
The server will not start unless it satisfies itself that we're
running against a compatible database schema.
2022-02-06 22:52:45 +01:00
..
2021-05-24 18:30:53 +02:00
2022-02-06 22:48:20 +01:00
2021-10-04 02:21:00 +02:00
2020-09-13 17:30:25 +02:00
2021-05-24 15:52:29 +02:00
2022-02-06 22:52:45 +01:00
2020-10-23 11:09:08 +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.

Use

The API specification may be found under ./spec.

Generate the documentation with:

./node_modules/.bin/redoc-cli bundle ./spec/openapi.yaml