@shun-js/shun-cli 0.0.6 → 0.0.7
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/bin/shun-start.js +4 -1
- package/package.json +2 -2
package/bin/shun-start.js
CHANGED
|
@@ -42,8 +42,10 @@ async function startServer(serverName) {
|
|
|
42
42
|
|
|
43
43
|
// check package
|
|
44
44
|
const npmGlobalPath = getNPMGlobalPath();
|
|
45
|
-
const
|
|
45
|
+
const serverRootPath = path.resolve(npmGlobalPath, `./${serverName}`);
|
|
46
|
+
const serverAppPath = path.resolve(serverRootPath, './app.js');
|
|
46
47
|
const serverAppPathIsExists = await isExists(serverAppPath);
|
|
48
|
+
debug(methodName, 'serverRootPath', serverRootPath);
|
|
47
49
|
debug(methodName, 'serverAppPath', serverAppPath);
|
|
48
50
|
debug(methodName, 'serverAppPathIsExists', serverAppPathIsExists);
|
|
49
51
|
if (!serverAppPathIsExists) {
|
|
@@ -64,6 +66,7 @@ async function startServer(serverName) {
|
|
|
64
66
|
try {
|
|
65
67
|
await pm2Start({
|
|
66
68
|
name: serverConfigPrefix,
|
|
69
|
+
cwd: serverRootPath,
|
|
67
70
|
script: serverAppPath,
|
|
68
71
|
args: serverConfigPath,
|
|
69
72
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shun-js/shun-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "shun.js cli",
|
|
5
5
|
"files": [
|
|
6
6
|
"bin",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"access": "public",
|
|
20
20
|
"registry": "https://registry.npmjs.org/"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "0ac873e0a5fa8aa4d15c33dad0071be74d6fa2d9"
|
|
23
23
|
}
|