使用surge发布前端项目
使用surge发布前端项目
慢才后生Surge是面向前端开发人员的静态web发布网站。
1. 安装node
2. 安装surge
npm install –global surge
1 | 操作命令: |
3.进入待发布的目录
cd
4.发布
【可直接命令(surge + project相对路径 + 自定义域名
)进行project的发布,不过域名可能会冲突!!!】
$ surge
Welcome to surge! (surge.sh)
Login (or create surge account) by entering email & password.
email: me@xiexianbin.cn
password: Surge2022
Running as me@xiexianbin.cn (Student)
project: D:\code\public
domain: fallacious-action.surge.sh 此域名可 自定义为 *****.surge.sh,域名太短可能会发生冲突,配置失效!!
encryption: *.surge.sh, surge.sh (185 days)
IP: 138.197.235.123
Success! - Published to fallacious-action.surge.sh
发布成功后,访问指定ip或域名即可在线看到 此project。
撤销已发布项目 使用命令 surge teardown+域名。
亲测速度还可以,很方便。可以自定义 多个域名,但共享同一个ip
评论
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果