Deis.setConfig()

Set environment variables for an app

Usage

Hover over inputs/exits for more info.

var Deis = require('machinepack-deis');


// Set environment variables for an app

Deis.setConfig({

token: '',

controller: 'http://deis.mydeisapp.com',

app: 'myawesomeapp',

values: [ { key: 'DATABASE_URL', value: 'postgres://localhost:5432' } ],

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// The token provided was invalid

notAuthenticated: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

token required

An access token for use with a Deis install.

''
controller required

The controller location of your Deis install.

'http://deis.mydeisapp.com'
app required

The uniquely identifiable name for the application.

'myawesomeapp'
values required

An array of key/value pairs to set as environment config values.

[ { key: 'DATABASE_URL', value: 'postgres://localhost:5432' } ]

Exits

error

An unexpected error occurred.

notAuthenticated

The token provided was invalid

success

OK.

[ { name: 'DATABASE_URL', value: 'postgres://localhost:5432' } ]