2014-12-03 09:26:14 -04:00
|
|
|
_ = require('lodash')
|
2014-11-17 15:40:16 -04:00
|
|
|
path = require('path')
|
|
|
|
|
2014-11-18 11:37:29 -04:00
|
|
|
config =
|
2014-10-31 11:59:23 -04:00
|
|
|
|
|
|
|
# TODO: Should be configurable
|
2014-11-18 08:53:07 -04:00
|
|
|
remoteUrl: 'https://staging.resin.io'
|
2014-11-18 10:11:07 -04:00
|
|
|
apiPrefix: '/ewa/'
|
2014-11-18 12:20:37 -04:00
|
|
|
|
|
|
|
# TODO: Check if not running on UNIX environment
|
|
|
|
# and add a custom path accordingly
|
2014-11-17 15:40:16 -04:00
|
|
|
dataPrefix: path.join(process.env.HOME, '.resin')
|
2014-11-20 14:00:39 -04:00
|
|
|
sshKeyWidth: 43
|
2014-11-18 11:37:29 -04:00
|
|
|
|
2014-12-03 09:26:14 -04:00
|
|
|
directories:
|
|
|
|
plugins: 'plugins'
|
|
|
|
os: 'os'
|
|
|
|
|
2014-11-28 12:46:24 -04:00
|
|
|
pubnub:
|
|
|
|
subscribe_key: 'sub-c-bbc12eba-ce4a-11e3-9782-02ee2ddab7fe'
|
|
|
|
publish_key: 'pub-c-6cbce8db-bfd1-4fdf-a8c8-53671ae2b226'
|
|
|
|
ssl: true
|
|
|
|
|
2014-12-01 09:50:18 -04:00
|
|
|
events:
|
|
|
|
deviceLogs: 'device-<%= uuid %>-logs'
|
|
|
|
|
2014-12-01 10:11:00 -04:00
|
|
|
urls:
|
|
|
|
signup: '/signup'
|
|
|
|
preferences: '/preferences'
|
|
|
|
keys: '/user/keys'
|
|
|
|
identify: '/blink'
|
|
|
|
authenticate: '/login_'
|
|
|
|
applicationRestart: '/application/<%= id %>/restart'
|
|
|
|
sshKey: '/user/keys/<%= id %>'
|
2014-12-01 11:41:14 -04:00
|
|
|
download: '/download'
|
2014-11-28 10:30:07 -04:00
|
|
|
|
2014-12-03 09:26:14 -04:00
|
|
|
config.directories = _.object _.map config.directories, (value, key) ->
|
|
|
|
return [ key, path.join(config.dataPrefix, value) ]
|
2014-11-18 11:37:29 -04:00
|
|
|
|
|
|
|
module.exports = config
|