@fecommunity/reactpress-server 1.0.0-beta.5 → 1.0.0-beta.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/reactpress-server.js +11 -9
- package/package.json +1 -1
package/bin/reactpress-server.js
CHANGED
|
@@ -42,21 +42,23 @@ program
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
//
|
|
46
|
-
console.log(chalk.cyan('📋 Creating
|
|
45
|
+
// 使用完整的基础配置模板,包含客户端和服务端配置
|
|
46
|
+
console.log(chalk.cyan('📋 Creating configuration file with essential settings...\n'));
|
|
47
47
|
|
|
48
|
-
//
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// 创建.env文件 - 最小化配置
|
|
53
|
-
const envContent = `DB_HOST=127.0.0.1
|
|
48
|
+
// 创建.env文件 - 包含所有基础配置(不包含JWT_SECRET)
|
|
49
|
+
const envContent = `# Database Config
|
|
50
|
+
DB_HOST=127.0.0.1
|
|
54
51
|
DB_PORT=3306
|
|
55
52
|
DB_USER=reactpress
|
|
56
53
|
DB_PASSWD=reactpress
|
|
57
54
|
DB_DATABASE=reactpress
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
|
|
57
|
+
# Client Config
|
|
58
|
+
CLIENT_SITE_URL=http://localhost:3001
|
|
59
|
+
|
|
60
|
+
# Server Config
|
|
61
|
+
SERVER_SITE_URL=http://localhost:${options.port}
|
|
60
62
|
`;
|
|
61
63
|
|
|
62
64
|
fs.writeFileSync(envPath, envContent);
|