# huatu-pc **Repository Path**: mingchen3398/huatu-pc ## Basic Information - **Project Name**: huatu-pc - **Description**: 华途官网 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-30 - **Last Updated**: 2024-01-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 华途官网 开发环境: - node 18.19.0 - npm 9.7.2 ## Setup 安装依赖并运行项目 ```shell # npm npm install npm run dev Start the development server on `http://localhost:3000` ``` ## 注意事项 0: **.vue文件一定只能有一个根标签!** ```vue ``` 不然就等渲染报错吧😏 1: 服务器部署配置文件`ecosystem.config.cjs`,更多详情访问:CSDN 2: 如果执行 `ecosystem.config.js`报错就修改下扩展名为.cjs,问题详情: stackoverflow # 部署 1.部署服务器的node版本需要>=18.19.2,已测试`['18.19.0']`可以正常运行,其他版本请自测 2.未安装pm2执行`npm i pm2 -g` 3.复制`.output`文件夹和`ecosystem.config.cjs`文件至服务器,执行: ```shell pm2 start ecosystem.config.cjs ``` ~~nginx代理关键配置:~~ ```editorconfig # 不需要了 # server # { # # listen 80 # # server_name www.huatusoft.com huatusoft.com # # *** # location /api/ { # proxy_pass http://121.41.72.228:9000; # } # location /profile/ { # proxy_pass http://121.41.72.228:9000; # } # location / { # proxy_pass http://127.0.0.1:3000; # } # # *** # } ``` final: 内网访问ip:port就能访问了,外网需要nginx开启映射