Skip to content

Commit

Permalink
Add ability to set interface address
Browse files Browse the repository at this point in the history
  • Loading branch information
tuaris committed Jul 14, 2024
1 parent 7884540 commit dcbc59a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/instance
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ var db = require('../lib/database');
var app = require('../app');

app.set('port', process.env.PORT || settings.webserver.port);
app.set('address', process.env.ADDRESS || settings.webserver.address || '::');

db.connect(null, function() {
var server = app.listen(app.get('port'), '::', function() {
var server = app.listen(app.get('port'), app.get('address'), function() {
debug('Express server listening on port ' + server.address().port);
});

Expand Down
2 changes: 2 additions & 0 deletions lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ exports.webserver = {
// port: Port # to configure the express webserver to listen for http requests on
// NOTE: Be sure to configure firewalls to allow traffic through this port or the explorer website may not be accessible remotely
"port": process.env.PORT || 3001,
// address: Interface address to configure the express webserver to listen for http requests on
"address": process.env.ADDRESS || "::",
// tls: a collection of settings that pertain to the TLS (Transport Layer Security) protocol feature (aka: ssl or https)
"tls": {
// enabled: Enable/disable TLS
Expand Down
2 changes: 2 additions & 0 deletions settings.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
// port: Port # to configure the express webserver to listen for http requests on
// NOTE: Be sure to configure firewalls to allow traffic through this port or the explorer website may not be accessible remotely
"port": 3001,
// address: Interface address to configure the express webserver to listen for http requests on
//"address": "0.0.0.0",
// tls: a collection of settings that pertain to the TLS (Transport Layer Security) protocol feature (aka: ssl or https)
"tls": {
// enabled: Enable/disable TLS
Expand Down

0 comments on commit dcbc59a

Please sign in to comment.