mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
In the `keystore` table, we now store information for our own
vessel (usually, where the Dougal server is installed). This
is an access function to retrieve that information.
The info stored for the vessel looks like this:
```yaml
type: vessel
key: ego
data:
imo: 9631890
mmsi: 257419000
name: Havila Charisma
contacts:
-
name: HC OM
phone: tel:+47123456789
email: hc.om@magseisfairfield.com
organisations:
Havila Charisma:
read: true
write: true
edit: true
```
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: IfNODE_ENV=testsome 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