summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Kazemi <darius.kazemi@gmail.com>2019-12-11 18:37:03 -0800
committerDarius Kazemi <darius.kazemi@gmail.com>2019-12-11 18:37:03 -0800
commit1157143d851ad53a095d7047e0a8d53c085bddd4 (patch)
tree07bd2b399557fd3853aae508d5292038e6474c33
parent5faad9ea56dcf2d715c9e11e07490f50115d25bb (diff)
config port
-rw-r--r--config/domain-example.js5
-rwxr-xr-xstart.js3
2 files changed, 6 insertions, 2 deletions
diff --git a/config/domain-example.js b/config/domain-example.js
index 3cb4c85..2f22fe7 100644
--- a/config/domain-example.js
+++ b/config/domain-example.js
@@ -1,3 +1,6 @@
module.exports = {
- 'domain' : 'localhost:3000' // Your domain goes here
+ // Your domain goes here. If there is a port it should be 'domain:port', but otherwise just 'domain'
+ 'domain' : 'localhost:3000' ,
+ 'port': '3000',
+ 'email': 'contact@example.com'
};
diff --git a/start.js b/start.js
index b47d73c..1a001d3 100755
--- a/start.js
+++ b/start.js
@@ -5,6 +5,7 @@ const path = require('path');
const mongoose = require('mongoose');
const databaseCredentials = require('./config/database.js');
+const port = require('./config/domain.js').port;
mongoose.connect(databaseCredentials.url, { useNewUrlParser: true });
mongoose.set('useCreateIndex', true);
@@ -26,6 +27,6 @@ const app = require('./app');
global.appRoot = path.resolve(__dirname);
-const server = app.listen(3000, () => {
+const server = app.listen(port, () => {
console.log(`Welcome to gathio! The app is now running on http://localhost:${server.address().port}`);
});