Skip to content

Commit 8cd859b

Browse files
committed
Update index.js
1 parent 22da47f commit 8cd859b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

index.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const destinationBackendMysqlNoMVC = argv.destination || path.join(process.cwd()
2929
const sourceBackendMysqlMVC = argv.source || path.join(__dirname, 'BackEndMysqlMVC');
3030
const destinationBackendMysqlMVC = argv.destination || path.join(process.cwd(), '../');
3131

32+
const sourceBackendMongoDBMVC = argv.source || path.join(__dirname, 'BackEndMongoMVC');
33+
const destinationBackendMongoDBMVC = argv.destination || path.join(process.cwd(), '../');
34+
3235
async function RunReactLoginSignIn() {
3336
try {
3437
await fs.copy(source, destination);
@@ -73,6 +76,16 @@ async function RunBackendMysqlMVC() {
7376
}
7477
}
7578

79+
async function RunBackendMongoDBMVC() {
80+
try {
81+
await fs.copy(sourceBackendMongoDBMVC, destinationBackendMongoDBMVC);
82+
console.log('Backend Development (MongoDB with MVC) Enviroment Created Successful');
83+
} catch (err) {
84+
console.error('Error copying folder:', err);
85+
}
86+
}
87+
88+
7689
async function main() {
7790
try {
7891
// Prompt the user to select an option from the list
@@ -81,13 +94,13 @@ async function main() {
8194
type: 'list',
8295
name: 'selection1',
8396
message: 'Select Your Front End :',
84-
choices: ['Uing TailWindCSS', 'Using Custom CSS'],
97+
choices: ['Using TailWindCSS', 'Using Custom CSS'],
8598
},
8699
{
87100
type: 'list',
88101
name: 'selection2',
89102
message: 'Select Your BackEnd End :',
90-
choices: ['Using MySQL without MVC', 'Using MySQL with MVC'],
103+
choices: ['Using MySQL without MVC', 'Using MySQL with MVC', 'Using MongoDB with MVC (Recommended)'],
91104
}
92105
]);
93106

@@ -115,6 +128,10 @@ async function main() {
115128
await RunBackendMysqlMVC();
116129
break;
117130

131+
case 'Using MongoDB with MVC (Recommended)':
132+
await RunBackendMongoDBMVC();
133+
break;
134+
118135
default:
119136
console.log('Invalid selection.');
120137
}

0 commit comments

Comments
 (0)