mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-04 13:40:05 +02:00
Merge pull request #1101 from farajfarook/master
Adding host configuration feature
This commit is contained in:
1
config/env/default.js
vendored
1
config/env/default.js
vendored
@@ -8,6 +8,7 @@ module.exports = {
|
||||
googleAnalyticsTrackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID || 'GOOGLE_ANALYTICS_TRACKING_ID'
|
||||
},
|
||||
port: process.env.PORT || 3000,
|
||||
host: process.env.HOST || '0.0.0.0',
|
||||
templateEngine: 'swig',
|
||||
// Session Cookie settings
|
||||
sessionCookie: {
|
||||
|
||||
2
config/env/production.js
vendored
2
config/env/production.js
vendored
@@ -7,6 +7,8 @@ module.exports = {
|
||||
certificate: './config/sslcerts/cert.pem'
|
||||
},
|
||||
port: process.env.PORT || 8443,
|
||||
// Binding to 127.0.0.1 is safer in production.
|
||||
host: process.env.HOST || '0.0.0.0',
|
||||
db: {
|
||||
uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean',
|
||||
options: {
|
||||
|
||||
@@ -37,8 +37,8 @@ module.exports.start = function start(callback) {
|
||||
|
||||
_this.init(function (app, db, config) {
|
||||
|
||||
// Start the app by listening on <port>
|
||||
app.listen(config.port, function () {
|
||||
// Start the app by listening on <port> at <host>
|
||||
app.listen(config.port, config.host, function () {
|
||||
|
||||
// Logging initialization
|
||||
console.log('--');
|
||||
|
||||
Reference in New Issue
Block a user