Commit Graph

15 Commits

Author SHA1 Message Date
D. Berge
9e73cb7e00 Clean up on SIGINT, SIGHUP signals 2023-10-14 20:07:19 +02:00
D. Berge
d7ab4eec7c Run some tasks periodically from the main process.
This reduces reliance on crontab jobs.
2023-10-14 20:06:38 +02:00
D. Berge
cdd96a4bc7 Don't bother trying to kill the child process on exit.
As the exit signal handler does not allow asynchronous tasks and
besides, killing the parent should kill its children too.
2023-10-14 20:02:54 +02:00
D. Berge
39a21766b6 Exit on start up errors 2023-10-14 20:02:04 +02:00
D. Berge
0fe40b1839 Add missing require 2023-09-15 14:22:02 +02:00
D. Berge
fbe0cb5efa Default the API prefix to /api 2023-05-18 18:34:10 +02:00
D. Berge
6d8a199a3c Allow setting IP to listen on.
Running on bare metal, 127.0.0.1 is a sensible choice of address
to bind on, but that is not the case when running inside a
container, so we add the ability to choose which IP to listen on.

This can be given via the environment variable HTTP_HOST when
starting the server or, if used as a module, as the second
argument of the start(port, host, path) function.
2023-04-07 09:04:51 +02:00
D. Berge
3ed8339aa3 Migrate more console messages to debug() 2022-05-12 22:09:08 +02:00
D. Berge
9aca927e49 Update version checking mechanism.
Checks both database schema and API versions.
2022-02-27 19:56:21 +01:00
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
D. Berge
940aea8c7b Run events manager in a separate process.
Not sure if this is going to do anything in
terms of improving the handling of and reacting
to events, but it doesn't seem to hurt terribly.

Eventually, all this will probably need to be
refactored to use EventEmitter.
2020-10-02 01:34:49 +02:00
D. Berge
03563bdaf2 Auto-create FSP/LSP events from nav header.
If the nav header is being received, this will
try to detect the start and end of line and create
an entry in the log.

It doesn't check whether FSP/FGSP LSP/LGSP entries
already do exist for that sequence.

Closes # 28.
2020-09-28 21:36:32 +02:00
D. Berge
d45e17fce3 Add scripts to launch Dougal services in production 2020-09-13 15:35:36 +02:00
D. Berge
52907921f1 Add websocket server to emit DB notifications 2020-09-04 01:33:18 +02:00
D. Berge
4c5d29494c Initial commit 2020-08-08 23:59:13 +02:00