Created
January 21, 2011 20:51
-
-
Save pagameba/790394 to your computer and use it in GitHub Desktop.
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
var Seq = require('node-seq'); | |
var configFile = require('path').join(__dirname, 'config.json'); | |
Seq() | |
.seq(checkPath), | |
.seq(parseConfig), | |
.seq(connectToDb), | |
.seq(startServer), | |
.catch(function(err) { | |
console.error(err.stack ? err.stack : err); | |
}); | |
function checkPath() { | |
path.exists(configFile, function(exists) { | |
if (!exists) { | |
throw new Error('Config file ' + configFile + ' does not exist. Use `cp config.json.sample '+configFile+'`.'); | |
} else { | |
this(null); | |
} | |
}); | |
} | |
function parseConfig() { | |
} | |
function connectToDb() { | |
} | |
function startServer() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment