xgqfrms / cdn

:rocket: :airplane: :bullettrain_side: free CDN for everyone who wants to speed his website freely!:smile:
https://cdn.xgqfrms.xyz
Apache License 2.0
17 stars 19 forks source link

Web Notification API #44

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

Web Notification API

https://www.cnblogs.com/xgqfrms/p/11169370.html

xgqfrms commented 4 years ago

https://cdn.xgqfrms.xyz/web-notification/index.html

xgqfrms commented 4 years ago

web notification

# test
$ browser-sync start --server --files "./index.html"
$ browser-sync start --server --files "./web-notification/*.*"
# $ browser-sync start --server --files "./web-notification/index.html"

http://localhost:3000/index.html http://localhost:3000/web-notification/index.html

browser-sync

# step 1
$ npm install -g browser-sync
# OR
$ npm i -g browser-sync

# step 2
$ cd build

# step 3
$ browser-sync start --server --files "./*.html"

$ browser-sync start --server --files "public/*.*"

$ browser-sync start --server --files "./src/**/*.*"

$ browser-sync start --server --files "./public/**/*.*"

# http://localhost:3000/public/index.html

# 必须使用正确的路径
# 1. 在 project 根目录下,运行命令, 默认的 url 根路由,就是当前的路径
# browser-sync start --server --files "./dist/**/*.*"
# 访问 http://localhost:3000/dist/index.html

# 2. 直接在 dist 目录下,运行命令, 默认的 url 根路由,就是当前的路径
# browser-sync start --server --files "./**/*.*"
# 访问 http://localhost:3000/index.html