create-uk-node-server 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -0
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2,6 +2,7 @@ import inquirer from "inquirer";
|
|
2
2
|
import path from "path";
|
3
3
|
import fs from "fs-extra";
|
4
4
|
import { fileURLToPath } from "url";
|
5
|
+
import { execSync } from "child_process";
|
5
6
|
|
6
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
7
8
|
|
@@ -30,6 +31,7 @@ async function main() {
|
|
30
31
|
const pkg = fs.readJsonSync(pkgPath);
|
31
32
|
pkg.name = answers.projectName;
|
32
33
|
fs.writeJsonSync(pkgPath, pkg, { spaces: 2 });
|
34
|
+
execSync(`cd ${projectPath} && npm install`);
|
33
35
|
console.log('success!')
|
34
36
|
console.log(`cd ${answers.projectName} and change DB connection in .env file and run npm start`)
|
35
37
|
})
|