Last active
December 23, 2015 06:59
-
-
Save jrthib/6597754 to your computer and use it in GitHub Desktop.
Sample server.js
This file contains hidden or 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
| // Load configurations | |
| var env = process.env.NODE_ENV || 'development' | |
| , config = require('./config/config')[env]; | |
| // Bootstrap db connection | |
| mongoose.connect(config.db); | |
| relations.use(relations.stores.redis, {client: redis.createClient(config.redis.port, config.redis.host)}); | |
| // Setup App Version | |
| process.env['APPNAME_IOS_VERSION'] = config.app.iosversion; | |
| process.env['APPNAME_ANDROID_VERSION'] = config.app.androidversion; | |
| // Setup Azure storage creds | |
| process.env['AZURE_STORAGE_ACCOUNT'] = config.azure.AZURE_STORAGE_ACCOUNT; | |
| process.env['AZURE_STORAGE_ACCESS_KEY'] = config.azure.AZURE_STORAGE_ACCESS_KEY; | |
| // Setup Balanced Payments API keys | |
| process.env['BALANCED_MARKETPLACE_URI'] = config.balanced_payments.MARKETPLACE_URI; | |
| process.env['BALANCED_SECRET'] = config.balanced_payments.SECRET; | |
| // Urban Airship keys | |
| process.env['URBAN_AIRSHIP_KEY'] = config.urbanairship.KEY; | |
| process.env['URBAN_AIRSHIP_SECRET'] = config.urbanairship.SECRET; | |
| process.env['URBAN_AIRSHIP_MASTER'] = config.urbanairship.MASTER; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment