diff options
-rw-r--r-- | config/domain-example.js | 5 | ||||
-rwxr-xr-x | start.js | 3 |
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' }; @@ -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}`); }); |