jenglish / ssptool

nodejs / express application for working with OpenControl data
MIT License
3 stars 5 forks source link

Non-localhost option for web server #14

Closed git-ingham closed 3 years ago

git-ingham commented 5 years ago

We need ssptool to run on a non-127.0.0.1 IP address. I have kludged it into what we are running (hard-coded 0.0.0.0), but it would be nice to have an "official" option for specifying the address(es) on which to listen for connections. (Same for port, but we can live with 3000)

jenglish commented 5 years ago

You may specify a different port on the command-line with:

ssptool server -p 8080

At present this can only be specified on the command line, not in the config file. (Do you need that? It's doable, just takes some replumbing).

jenglish commented 5 years ago

Re: listening IP address: ssptool server actually does listen on all addresses (0.0.0.0).

The startup message says "Listening on http://localhost:%d" mainly to present a URL that can be copied and pasted into a web browser; more accurately it should just say "listening on port %d"

git-ingham commented 5 years ago

Specifying the port in the config file would be nice, but not necessary. Any way we run it could include the command-line option.