Skip to content

Commit 91a9d30

Browse files
BackendExpertJehanKandyAnupa1998
committed
Update index.js
Co-Authored-By: JehanKandy <jehankandy@gmail.com> Co-Authored-By: Anupa Gamage <125038143+Anupa1998@users.noreply.github.com>
1 parent 323d0e3 commit 91a9d30

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

index.js

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,38 @@ async function RunBackendMysqlMVC() {
7070
}
7171
}
7272

73+
async function main() {
74+
try {
75+
// Prompt the user to select an option from the list
76+
const answers = await inquirer.prompt([
77+
{
78+
type: 'list',
79+
name: 'selection',
80+
message: 'Select an option:',
81+
choices: ['AppTW', 'App'],
82+
}
83+
]);
84+
85+
const { selection } = answers;
86+
87+
// Handle the user's selection
88+
switch (selection) {
89+
case 'AppTW':
90+
await RunReactLoginSignInTW();
91+
break;
92+
case 'App':
93+
console.log('Selected App. Implement function here.');
94+
// Implement other functions or logic for 'App' here
95+
break;
96+
default:
97+
console.log('Invalid selection.');
98+
}
99+
} catch (error) {
100+
console.error(`An error occurred: ${error.message}`);
101+
}
102+
}
103+
104+
main();
105+
106+
73107

74-
module.exports = {
75-
RunReactLoginSignIn,
76-
RunReactLoginSignInTW,
77-
RunBackendMysqlNoMVC,
78-
RunBackendMysqlMVC
79-
}

0 commit comments

Comments
 (0)