Skip to content

Instantly share code, notes, and snippets.

@matmar10
Created January 10, 2015 22:45
Show Gist options
  • Save matmar10/81096d2982ba855eecaa to your computer and use it in GitHub Desktop.
Save matmar10/81096d2982ba855eecaa to your computer and use it in GitHub Desktop.
Example Architect loadConfig usage
'use strict';
var architect = require('architect');
var path = require('path');
architect.loadConfig(path.join(__dirname, 'config.js'), function (err, architectConfig) {
if (err) {
console.error('Could not create Architect config:', err);
process.exit(1);
return;
}
architect.createApp(architectConfig, function (err, app) {
if (err) {
console.error('Could not start Architect app:', err);
process.exit(2);
return;
}
console.log('Architect app started OK!');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment