@@ -57,14 +57,14 @@ pnpm bundle
57
57
template = { ` const { cpus } = require('os')
58
58
const { execSync } = require('child_process')
59
59
const nodePath = execSync(\` npm root --quiet -g\` , { encoding: 'utf-8' }).split(
60
- '\n ',
60
+ '\\ n',
61
61
)[0]
62
62
const cpuLen = cpus().length
63
63
module.exports = {
64
64
apps: [
65
65
{
66
66
name: 'mx-server',
67
- script: 'out/index.js',
67
+ script: './ out/index.js',
68
68
autorestart: true,
69
69
exec_mode: 'cluster',
70
70
watch: false,
@@ -79,13 +79,13 @@ module.exports = {
79
79
},
80
80
},
81
81
],
82
- }
82
+ }
83
83
` }
84
84
/>
85
85
86
86
### 4. 启动
87
87
88
- 1 . 进入 ` ./apps/core/out ` ,创建一个 ` ecosystem.config.js ` 文件
88
+ 1 . 进入 ` ./apps/core ` ,修改 ` ecosystem.config.js ` 文件
89
89
2 . 将上方复制的内容黏贴进去,然后执行以下命令启动服务
90
90
91
91
``` bash
@@ -125,8 +125,6 @@ setEnvValues(updatedEnvValues);
125
125
const handleCopyToClipboard = () => {
126
126
copy (updatedEnvTemplate );
127
127
};
128
-
129
- useEffect (() => {
130
128
const updatedTemplate = nowTemplate .replace (
131
129
/ args:\s * '([^ '] * )'/ ,
132
130
` args: '${selectedArgs .join (' ' )}' `
@@ -139,8 +137,8 @@ const updatedEnvTemplate = updatedTemplate.replace(
139
137
.join (' , \n ' )}
140
138
} `
141
139
);
142
- setNowTemplate ( updatedEnvTemplate );
143
- } , [selectedArgs , envValues ]);
140
+
141
+ useEffect (() => setNowTemplate ( updatedEnvTemplate ) , [selectedArgs , envValues ]);
144
142
145
143
return (
146
144
@@ -247,7 +245,7 @@ return (
247
245
248
246
<button
249
247
type = " button"
250
- className = " border bg-black w-full text-white px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:bg-gray-700 dark:border-gray-700 dark:text-gray-300 "
248
+ className = " border bg-black w-full px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:text-white hover:bg-gray-700 dark:border-gray-700 dark:text-gray-300 "
251
249
onClick = { handleCopyToClipboard }
252
250
>
253
251
复制
0 commit comments