Files
certd/start.sh
2025-04-12 23:59:03 +08:00

35 lines
845 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
set -e
echo "即将删除packages下除ui之外的其他目录按y确认如果您没有修改过源码按y即可"
read -p "y/n: " confirm
if [ $confirm != "y" ]; then
echo "取消操作"
exit 1
fi
find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'ui' -exec rm -rf {} +
echo "删除成功"
echo "安装pnpm, 前提是已经安装了nodejs"
npm install -g pnpm@ --registry https://registry.npmmirror.com
echo "安装依赖"
pnpm install --registry https://registry.npmmirror.com
echo "开始构建"
echo "构建certd-client"
export NODE_OPTIONS=--max-old-space-size=32768
cd packages/ui/certd-client
npm run build
cp -r dist/* ../certd-server/public
echo "构建certd-server"
cd ../certd-server
npm run build
echo "构建完成"
echo "启动服务"
# 前台运行
npm run start
# 后台运行
# nohup npm run start &