From 56bbb8d0ff3b34574ba97b2899c54280345b3a68 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 28 Nov 2023 15:08:11 +0800 Subject: [PATCH] fix README.md --- README.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 90d81222..80f87400 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,39 @@ # MoviePilot-Frontend -This template should help get you started developing with Vue 3 in Vite. +[MoviePilot](https://github.com/jxxghp/MoviePilot) 的前端项目。 -## Recommended IDE Setup +## 推荐的IDE设置 -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur). +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (并禁用 Vetur). -## Type Support for `.vue` Imports in TS +## 配置Vite -Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. +请参阅 [Vite 配置参考](https://vitejs.dev/config/). -However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can run `Volar: Switch TS Plugin on/off` from VSCode command palette. - -## Customize configuration - -See [Vite Configuration Reference](https://vitejs.dev/config/). - -## Project Setup +## 依赖安装 ```sh yarn ``` -### Compile and Hot-Reload for Development +### 开发运行 ```sh yarn dev ``` -### Type-Check, Compile and Minify for Production +### 编译打包 ```sh yarn build ``` + +### 静态运行 + +1. 使用 `nginx` 等Web服务器托管 `dist` 静态文件,nginx配置参考 `public/nginx.conf`。 + +2. 使用 `node` 命令直接运行`service.js`,默认监听 `3000` 端口,设置环境变量 `NGINX_PORT` 来调整运行端口。 + +```shell +node dist/service.js +```