DataFront/start.sh

29 lines
388 B
Bash
Raw Normal View History

2023-08-30 07:56:24 +00:00
#!/bin/bash
2024-05-04 15:21:55 +00:00
# 设置Node.js版本
export PATH="/root/.nvm/versions/node/v22.1.0/bin:$PATH"
2024-05-04 15:23:17 +00:00
node -v
2024-05-04 15:21:55 +00:00
# 继续执行脚本的其他部分
2023-08-30 07:56:24 +00:00
# 1. 执行 git pull
git pull
# 2. 执行 npm i
npm i
# 3. 执行 npm run build
npm run build
2023-08-30 08:12:19 +00:00
cp ./word.json ./.output/
2023-08-30 07:56:24 +00:00
# 4. 切换到 ./.output 目录
2023-08-30 08:07:02 +00:00
cd ./.output
2023-08-30 07:56:24 +00:00
2023-08-30 08:18:16 +00:00
2024-05-04 15:10:36 +00:00
export PORT=3030
2023-08-30 07:56:24 +00:00
# 5. 执行 node ./server/index.mjs
2024-05-04 15:10:36 +00:00
node ./server/index.mjs