Add a config var to determine what port for the api to listen on.

This commit is contained in:
Pagan Gazzard 2015-01-13 17:14:51 +00:00 committed by Pablo Carranza Vélez
parent 644ad14295
commit c8023e0780
2 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@ knex.init.then ->
application = require './application' application = require './application'
console.log('Starting API server..') console.log('Starting API server..')
api.listen(80) api.listen(config.listenPort)
console.log('Starting Apps..') console.log('Starting Apps..')
knex('app').select() knex('app').select()

View File

@ -9,6 +9,7 @@ checkInt = (s) ->
module.exports = config = module.exports = config =
apiEndpoint: process.env.API_ENDPOINT ? 'https://api.resin.io' apiEndpoint: process.env.API_ENDPOINT ? 'https://api.resin.io'
listenPort: process.env.LISTEN_PORT ? 80
registryEndpoint: process.env.REGISTRY_ENDPOINT ? 'registry.resin.io' registryEndpoint: process.env.REGISTRY_ENDPOINT ? 'registry.resin.io'
pubnub: pubnub:
subscribe_key: process.env.PUBNUB_SUBSCRIBE_KEY ? 'sub-c-bananas' subscribe_key: process.env.PUBNUB_SUBSCRIBE_KEY ? 'sub-c-bananas'