20 lines
383 B
Bash
20 lines
383 B
Bash
|
|
#!/bin/sh
|
||
|
|
# 启动Nginx和Node.js服务
|
||
|
|
|
||
|
|
# 初始化Nginx配置
|
||
|
|
node -e "
|
||
|
|
const nginxManager = require('./server/services/nginxManager');
|
||
|
|
const config = require('./server/config');
|
||
|
|
|
||
|
|
if (config.useNginx) {
|
||
|
|
const result = nginxManager.initConfig();
|
||
|
|
console.log('Nginx config initialized:', result.message);
|
||
|
|
}
|
||
|
|
"
|
||
|
|
|
||
|
|
# 启动Nginx
|
||
|
|
nginx
|
||
|
|
|
||
|
|
# 启动Node.js服务
|
||
|
|
exec node server/index.js
|