Files
dougal-software/lib/www/server
D. Berge 8bbe3aee70 Make planned line names configurable.
Line names are made up based on:

* Certain properties defined by the system
* Values assigned to those properties either by the system
  or by the user (line number, sequence, attempt, etc.)
* A line format specification configured by the user for each
  project (`online.line.lineNameBuilder.fields`)

Closes #129.
2025-07-09 16:30:26 +02:00
..
2025-07-09 16:30:26 +02:00
2023-11-02 23:47:13 +01:00
2024-05-01 10:06:35 +02:00
2023-10-14 20:07:19 +02: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