function questions() {
    inquirer
        .prompt({
            name: 'action',
            type: 'list',
            message: 'Select an option:',
            choices: [
                    'View employees',
                    'View departments',
                    'View roles',
                    'Add employee',
                    'Add department',
                    'Add role',
                    'Update employee role',
                    'EXIT'
                    ]
            }).then(function (answer) {
                switch (answer.action) {
                    case 'View employees':
                        viewEmployees();
                        break;
                    case 'View departments':
                        viewDepartments();
                        break;
                    case 'View roles':
                        viewRoles();
                        break;
                    case 'Add employee':
                        addEmployee();
                        break;
                    case 'Add department':
                        addDepartment();
                        break;
                    case 'Add role':
                        addRole();
                        break;
                    case 'Update employee role':
                        updateEmployee();
                        break;
                    case 'EXIT': 
                        exitServer();
                        break;
                    default:
                        break;
                }
        })
}
// prompts user with list of questions to choose from

prompts user with list of questions to choose from
prompts user with list of questions to choose from
function questions() {
    inquirer
        .prompt({
            name: 'action',
            type: 'list',
            message: 'Select an option:',
            choices: [
                    'View employees',
                    'View departments',
                    'View roles',
                    'Add employee',
                    'Add department',
                    'Add role',
                    'Update employee role',
                    'EXIT'
                    ]
            }).then(function (answer) {
                switch (answer.action) {
                    case 'View employees':
                        viewEmployees();
                        break;
                    case 'View departments':
                        viewDepartments();
                        break;
                    case 'View roles':
                        viewRoles();
                        break;
                    case 'Add employee':
                        addEmployee();
                        break;
                    case 'Add department':
                        addDepartment();
                        break;
                    case 'Add role':
                        addRole();
                        break;
                    case 'Update employee role':
                        updateEmployee();
                        break;
                    case 'EXIT': 
                        exitServer();
                        break;
                    default:
                        break;
                }
        })
}
function questions ( ) { inquirer . prompt ( { name : 'action' , type : 'list' , message : 'Select an option:' , choices : [ 'View employees' , 'View departments' , 'View roles' , 'Add employee' , 'Add department' , 'Add role' , 'Update employee role' , 'EXIT' ] } ) . then ( function ( answer ) { switch ( answer . action ) { case 'View employees' : viewEmployees ( ) ; break ; case 'View departments' : viewDepartments ( ) ; break ; case 'View roles' : viewRoles ( ) ; break ; case 'Add employee' : addEmployee ( ) ; break ; case 'Add department' : addDepartment ( ) ; break ; case 'Add role' : addRole ( ) ; break ; case 'Update employee role' : updateEmployee ( ) ; break ; case 'EXIT' : exitServer ( ) ; break ; default : break ; } } ) }
prompts user with list of questions to choose from
prompts user with list of questions to choose from