DataFront/start.sh

29 lines
388 B
Bash

#!/bin/bash
# 设置Node.js版本
export PATH="/root/.nvm/versions/node/v22.1.0/bin:$PATH"
node -v
# 继续执行脚本的其他部分
# 1. 执行 git pull
git pull
# 2. 执行 npm i
npm i
# 3. 执行 npm run build
npm run build
cp ./word.json ./.output/
# 4. 切换到 ./.output 目录
cd ./.output
export PORT=3030
# 5. 执行 node ./server/index.mjs
node ./server/index.mjs