Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set interface address #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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