Created
January 10, 2015 22:45
-
-
Save matmar10/81096d2982ba855eecaa to your computer and use it in GitHub Desktop.
Example Architect loadConfig usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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