-
-
Save jterrero/95f10b9a5ba15db47d9be8be976b2c67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
/var/www/app/config/environment.js | |
*/ | |
module.exports = { | |
production:{ | |
host: 'api.somedomain.io', | |
port: 81, | |
db: 'db.somedomain.io', | |
db_user: 'root', | |
db_password: 'adfasdfasdf', | |
db_name: 'v1-somedb', | |
xmpp_server: 'somedomain.io' | |
}, | |
dev:{ | |
host: 'api.somedomain.io', | |
port: 3000, | |
db: 'db.somedomain.io', | |
db_user: 'root', | |
db_password: 'adfasdfasdf', | |
db_name: 'v2-somedb', | |
xmpp_server: 'xmpp2.somedomain.io' | |
} | |
}; | |
----- | |
/* | |
/var/www/app/app.js | |
*/ | |
const environment = require('./config/environment') | |
var dotenv = require('dotenv'); | |
dotenv.load(); | |
var port = environment.port; //should return port 81 specified on environment.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment