balena-cli/lib/config.coffee

23 lines
530 B
CoffeeScript
Raw Normal View History

2014-11-18 15:37:29 +00:00
_ = require('lodash')
url = require('url')
2014-11-17 19:40:16 +00:00
path = require('path')
2014-11-18 15:37:29 +00:00
config =
2014-10-31 15:59:23 +00:00
# TODO: Should be configurable
remoteUrl: 'https://staging.resin.io'
2014-11-18 14:11:07 +00:00
apiPrefix: '/ewa/'
2014-11-18 16:20:37 +00:00
# TODO: Check if not running on UNIX environment
# and add a custom path accordingly
2014-11-17 19:40:16 +00:00
dataPrefix: path.join(process.env.HOME, '.resin')
2014-11-18 15:37:29 +00:00
config.urls =
signup: '/signup'
# Append config.remoteUrl before every url
config.urls = _.object _.map config.urls, (value, key, object) ->
return [ key, url.resolve(config.remoteUrl, value) ]
module.exports = config