Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!module.parent) {
- Step(
- function() {
- var rl = readline.createInterface(process.stdin, process.stdout, null);
- var loginCallback = this.parallel();
- var configCallback = this.parallel();
- var fixturesCallback = this.parallel();
- rl.question("Enter your CouchDB username: ", function(username) {
- rl.question("Enter your CouchDB password (NOTE: THIS WILL BE ECHOED ON YOUR SCREEN): ", function(password) {
- rl.close();
- process.stdin.destroy();
- loginCallback(null, {username: username, password: password});
- });
- });
- fs.readFile('config.js', function(err, configFile) {
- if (err) {
- return configCallback(err, null);
- }
- var config = JSON.parse(configFile);
- configCallback(null, config);
- });
- fs.readFile('fixtures.json', function(err, fixturesFile) {
- if (err) {
- return fixturesCallback(err, null);
- }
- var fixtures = JSON.parse(fixturesFile);
- fixturesCallback(null, fixtures);
- });
- },
- function(err, loginInfo, config, fixtures) {
- if (err) {
- throw err;
- }
- main(config, loginInfo.username, loginInfo.password, fixtures);
- }
- );
- }
Add Comment
Please, Sign In to add comment