LocalSailsApps.writeRoutesConfig()

Write the config/routes.js file

Usage

Hover over inputs/exits for more info.

var LocalSailsApps = require('machinepack-local-sails-apps');


// Write the config/routes.js file

LocalSailsApps.writeRoutesConfig({

destination: '/Users/mikermcneil/foo/',

code: 'module.exports = {}',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

destination required

The path to the app (if path is not absolute, will be resolved from the current working directory)

'/Users/mikermcneil/foo/'
code required

The config code to write.

'module.exports = {}'

Exits

error

An unexpected error occurred.

success

OK.