forked from ashleybaldock/simlist
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
31 lines (18 loc) · 1.77 KB
/
README
File metadata and controls
31 lines (18 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Simlist - Simutrans listing server
server.js is designed to be run via Node, version 10.12 or greater. Logging goes to stdout/stderr.
Persistent data is saved to a MongoDB database.
Configuration is via environment parameters:
HEADER_IMAGE - the header image/logo to use for the top of the page (default: "simlogo.png")
PORT - the TCP port to bind to (default: "80")
MONGOLAB_URI - the (MongoLabs) or otherwise MongoDB connection string (no default)
PRUNE_INTERVAL - the time (in seconds) after which old server listings are removed (default: 604800)
Installation
Check out source, run "npm install" to install required packages. Set desired environment parameters and then run using "node server.js".
Instances
The server can be run with multiple instances, if you need multiple listings servers. Note that this requires compiled-in support from the game itself and is only really useful to let you run listings servers for both the standard and experimental versions of the game.
The https support assumes the certificates are properly saved as usual. You need to alter server.js for the domain and path and have root run regulary
On first run to download certificates, outcomment the certificate files near line 42+43, start the server and do the challenge (and make sure the acme directory exists)
certbot certonly -manual -m my@email -d dnsname.for.challenge --webroot --webroot-path /home/node-js-user/simlist-master/acme/
Now there should be valid certificates, chaeck permission and can remove the comments in line 42 and 43, restart nodejs and add a cronjob to renew the certificates
certbot certonly -n -m my@email -d dnsname.for.challenge --webroot --webroot-path /home/node-js-user/simlist-master/acme/
The listserver will run on http and https