fixed setup script

This commit is contained in:
David Baldwynn 2016-05-21 12:49:00 -07:00
parent bed26ab214
commit b5d7c16649
4 changed files with 8 additions and 5 deletions

View File

@ -49,8 +49,10 @@ var config_nev = function () {
}
}
}, function(err, options){
if(err) throw err;
nev.generateTempUserModel(User);
});
nev.generateTempUserModel(User);
};
config_nev();

View File

@ -27,7 +27,6 @@ module.exports = function(app) {
// Setting up the users authentication api
if(!config.signupDisabled) {
console.log('signupDisabled');
app.route('/auth/signup').post(users.signup);
}
app.route('/auth/signin').post(users.signin);

View File

@ -15,8 +15,7 @@ module.exports = function() {
* We'll Look for a valid NODE_ENV variable and if one cannot be found load the development NODE_ENV
*/
var environmentFiles = glob.sync('./config/env/' + process.env.NODE_ENV + '.js');
console.log('process.env.MAILER_EMAIL_ID: '+process.env.MAILER_EMAIL_ID );
if (!environmentFiles.length) {
if (process.env.NODE_ENV) {
console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead'));

View File

@ -174,7 +174,7 @@ var questions = [
console.log(chalk.green('\n\nHi, welcome to TellForm Setup'));
console.log(chalk.green('This will only run the first time you run TellForm\n--------------------------------------------------\n\n'));
console.log(chalk.green('You should only run this the first time you setup TellForm\n--------------------------------------------------\n\n'));
inquirer.prompt([questions[0]]).then(function (confirmAns) {
if(confirmAns['shouldContinue']) {
@ -209,6 +209,9 @@ inquirer.prompt([questions[0]]).then(function (confirmAns) {
console.log(chalk.green('Successfully created user'));
delete email;
delete pass;
console.log(chalk.green('Have fun using TellForm!'));
process.exit(1);
});
});
});