前端静态页面 发布工具surge

Surge是面向前端开发人员的静态web发布网站。

安装:

# 1. 安装node

# 2. 安装surge

npm install --global surge

操作命令:

$ surge --help

surge – single command web publishing. (v0.23.1)

Usage:

surge <project> <domain>

  Options:
    -a, --add           adds user to list of collaborators (email address)
    -r, --remove        removes user from list of collaborators (email address)
    -V, --version       show the version number
    -h, --help          show this help message
  Additional commands:
    surge whoami        show who you are logged in as
    surge logout        expire local token
    surge login         only performs authentication step
    surge list          list all domains you have access to
    surge teardown      tear down a published project
    surge plan          set account plan

Guides:

Getting started surge.sh/help/getting-started-with-surge

Custom domains surge.sh/help/adding-a-custom-domain

Additional help surge.sh/help

When in doubt, run surge from within your project directory.

发布步骤:可直接命令(surge+project相对路径+自定义域名)进行project的发布,不过域名可能会冲突!!!

# 进入待发布的目录

cd <to-public-dir>

# 发布

$ 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值