Appearance
命令行
trickd dev
开发服务器
bash
# 默认local,以config.local.ts配置启动
trickd dev
# 以config.prod.ts配置启动
trickd dev --config prod
# 默认local,以config.local.ts配置启动
trickd dev
# 以config.prod.ts配置启动
trickd dev --config prod
选项 | |
---|---|
--config <config> | 指定配置文件,参考启用配置 |
trickd build
构建生产版本
bash
# 默认local,以config.local.ts配置进行构建
trickd build
# 以config.prod.ts配置进行构建
trickd build --config prod
# 默认local,以config.local.ts配置进行构建
trickd build
# 以config.prod.ts配置进行构建
trickd build --config prod
选项 | |
---|---|
--config <config> | 指定配置文件,参考启用配置 |
部署
当 trickd build
构建完成后,在项目根目录会生成 .dist
目录,可以使用 pm2
守护进程或者 bash
启动。
bash
# pm2
pm2 start ./.dist/ecosystem.config.cjs
# bash
bash ./dist/start.sh
# pm2
pm2 start ./.dist/ecosystem.config.cjs
# bash
bash ./dist/start.sh
trickd clean
清除缓存
bash
trickd clean
trickd clean