重构:分离 HTML/CSS/JS,项目结构更清晰
This commit is contained in:
12
README.md
12
README.md
@@ -30,8 +30,8 @@
|
||||
|
||||
直接用浏览器打开 HTML 文件,无需任何安装:
|
||||
|
||||
1. 下载 `speech-t2a.html` 文件
|
||||
2. 双击用浏览器(Chrome/Edge/Firefox)打开即可
|
||||
1. 下载并解压本项目
|
||||
2. 双击 `index.html` 用浏览器(Chrome/Edge/Firefox)打开即可
|
||||
|
||||
---
|
||||
|
||||
@@ -58,7 +58,7 @@ cd /path/to/speech-t2a
|
||||
python3 -m http.server 8197
|
||||
```
|
||||
|
||||
4. 打开浏览器,访问:**http://localhost:8197/speech-t2a.html**
|
||||
4. 打开浏览器,访问:**http://localhost:8197/index.html**
|
||||
|
||||
> ⚠️ 关闭终端会停止服务,需要保持窗口开启
|
||||
|
||||
@@ -70,7 +70,7 @@ python3 -m http.server 8197
|
||||
|
||||
**步骤:**
|
||||
|
||||
1. 将 `speech-t2a.html` 上传到服务器,例如 `/var/www/speech-t2a/`
|
||||
1. 将 `index.html` 上传到服务器,例如 `/var/www/speech-t2a/`
|
||||
2. 编辑 Nginx 配置:
|
||||
|
||||
```bash
|
||||
@@ -86,7 +86,7 @@ server {
|
||||
|
||||
# 静态文件目录
|
||||
root /var/www/speech-t2a;
|
||||
index speech-t2a.html;
|
||||
index index.html;
|
||||
|
||||
# 允许浏览器访问
|
||||
location / {
|
||||
@@ -106,7 +106,7 @@ sudo nginx -t
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
5. 访问:**http://你的服务器IP:8197/speech-t2a.html**
|
||||
5. 访问:**http://你的服务器IP:8197/index.html**
|
||||
|
||||
> 💡 阿里云/腾讯云等云服务器需在安全组开放 `8197` 端口
|
||||
|
||||
|
||||
Reference in New Issue
Block a user