https://now-demo-qqbrkhqirr.now.sh/
now alias https://now-demo-qqbrkhqirr.now.sh/ ssl.lilidong.cn
now --token '你的token' 修改文件后需要重新发布和指定域名dns解析
## 可以是index.html
## 可以是node 必选300 端口 而且要暴露出来app 服务
## now 部署node应用
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now
> Error! No existing credentials found. Please run "now login" or pass "--token"
> More details: https://err.sh/now-cli/no-credentials-found
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now --token '你的token'
> Error! Missing `start` (or `now-start`) script in `package.json`. See: https://docs.npmjs.com/cli/start
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now --token '你的token'
https://nodejshttpsbysgi-rbfeabetzv.now.sh> Error! Unexpected error. Please try again later. (
You are on the OSS plan. Your code and logs will be made public. If you agree with that, please run again with --public.)
now的二级域名package.json name字段
"name": "nodejs_https_by_sgi",
解析dns
now --token '你的token' alias https://nodejshttpsbysgi-rbfeabetzv.now.sh ssl.lilidong.cn
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now alias https://nodejshttpsbysgi-rbfeabetzv.now.sh ssl.lilidong.cn
> Error! No existing credentials found. Please run "now login" or pass "--token"
> More details: https://err.sh/now-cli/no-credentials-found
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now --token '你的token' alias https://nodejshttpsbysgi-rbfeabetzv.now.sh ssl.lilidong.cn
> ssl.lilidong.cn is a custom domain.
> Verifying the DNS settings for ssl.lilidong.cn (see https://zeit.world for help)
## dns的配置
now --token '你的token' dns
now --token '你的token' alias https://nodejshttpsbysgi-rbfeabetzv.now.sh https.lilidong.cn
--
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now --token '你的token' alias https://nodejshttpsbysgi-rbfeabetzv.now.sh https.lilidong.cn
> https.lilidong.cn is a custom domain.
> Verifying the DNS settings for https.lilidong.cn (see https://zeit.world for help)
> Resolved IP: none
> Nameservers: f1g1ns1.dnspod.net, f1g1ns2.dnspod.net
> Error! Please make sure that your nameservers point to zeit.world.
> Examples: (full list at https://zeit.world)
> - a.zeit.world 96.45.80.1
> - b.zeit.world 46.31.236.1
> - c.zeit.world 43.247.170.1
> Alternatively, ensure it resolves to alias.zeit.co via CNAME / ALIAS.
now --token '你的token' dns add my-app.com @ MX mail.awesome-now.us 10
now dns add zeit.rocks @ CAA '0 issue "comodo.com"'
now dns add <domain> <name> <record type> <value> [mx_priority]
now --token '你的token' dns add lilidong.cn ssl MX nodejshttpsbysgi-rbfeabetzv.now.sh 10
now --token '你的token' dns add lilidong.cn ssl A 127.0.0.1
now dns add zeit.rocks ext A 127.0.0.1
Creates an A record that makes the subdomain ext.zeit.rocks resolve to the server located at the IP address 127.0.0.1.
now dns add zeit.rocks @ MX mail.awesome-now.us 10
Creates an MX record which makes the mail server located at mail.awesome-now.us responsible for handling emails sent to an address suffixed with @zeit.rocks.
Administrator@lenovo-PC MINGW64 /e/jackieli/node-code-write-练习/npm模块/now/now-https-vue
$ now --token '你的token' dns
Δ now dns [options] <command>
Commands:
add [details] Add a new DNS entry (see below for examples)
rm [id] Remove a DNS entry using its ID
ls [domain] List all DNS entries for a domain
Options:
-h, --help Output usage information
-A FILE, --local-config=FILE Path to the local `now.json` file
-Q DIR, --global-config=DIR Path to the global `.now` directory
-d, --debug Debug mode [off]
-t TOKEN, --token=TOKEN Login token
-T, --team Set a custom team scope
Examples:
– Add an A record for a subdomain
$ now dns add <DOMAIN> <SUBDOMAIN> <A | AAAA | ALIAS | CNAME | TXT> <VALUE>
$ now dns add zeit.rocks api A 198.51.100.100
– Add an MX record (@ as a name refers to the domain)
$ now dns add <DOMAIN> '@' MX <RECORD VALUE> <PRIORITY>
$ now dns add zeit.rocks '@' MX mail.zeit.rocks 10
– Add an SRV record
$ now dns add <DOMAIN> <NAME> SRV <PRIORITY> <WEIGHT> <PORT> <TARGET>
$ now dns add zeit.rocks SRV 10 0 389 zeit.party
now --token '你的token' dns add lilidong.cn ssl A 96.45.80.1
now --token
now --token '你的token' cc add
now --token '你的token' upgrade
now --token '你的token' alias https://nodejshttpsbysgi-rbfeabetzv.now.sh ssl.lilidong.cn
now.sh是一个傻瓜式的部署node应用,但是有项目个数和流量限制,可用于学习和测试用,而且最关键的是如果你不会https和http2协议,都给你打包好了,可以一部到位 http-->https || http1.1 --> http2
还可以把自己的自动生成的域名指定到dns的我们的域名,https证书啥的都不用考虑,果然很贴心,点赞
注册 https://zeit.co/
demo1
https://now-demo-qqbrkhqirr.now.sh/
demo2
https://nodejshttpsbysgi-rbfeabetzv.now.sh
自己部署now的命令(供学习参考windows,mac下不需要toekn)