github-cdn::satellite:Github CDN服务器

  • G2_484091
    了解作者
  • 76KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-10 04:24
    上传日期
:satellite: Github CDN 是的 Github上用于回购资产的非官方内容交付网络。 :white_medium_star: 产品特点 获取回购元数据:分支机构,标签和PR 服务回购和Gist文件 即时访问被推送到Github的新更改* 非常适合快速原型制作/开发 包括 与Github Enterprise兼容的 *除非请求由于网络故障或速率限制而失败 :female_sign:‍:female_sign_selector: 终点 /:owner/:repo 获取默认分支和所有引用(分支,标签和PR) 例如。 检索的元数据 输出示例{ "default_branch" : "master" , "refs" : { "heads" : { ... } , "tags" : { ... } , "pull" : { ... } } } /:owner/:repo/:ref 解决semver的repo ref。 重定向到repo ref的根 例如。 例如。 例如。 /:owner/:repo/:ref?badge 解决参考并重
github-cdn-master.zip
  • github-cdn-master
  • .eslintrc.json
    147B
  • api
  • get-path.js
    1.3KB
  • get-repo.js
    843B
  • get-gist.js
    545B
  • serve-landing.js
    3.1KB
  • get-ratelimit.js
    807B
  • .gitignore
    1.6KB
  • package.json
    1.3KB
  • package-lock.json
    216.5KB
  • .nvmrc
    9B
  • LICENSE
    1KB
  • index.js
    701B
  • CHANGELOG.md
    1.5KB
  • now.json
    552B
  • .github
  • workflows
  • create-github-release.yml
    615B
  • lib
  • utils
  • github-api.js
    267B
  • cache-fallback.js
    1KB
  • log.js
    89B
  • config.js
    1.9KB
  • route.js
    618B
  • cache.js
    475B
  • res-error.js
    151B
  • github
  • get-remote-info.js
    910B
  • get-path.js
    1.8KB
  • get-gist.js
    1.4KB
  • resolve-ref.js
    611B
  • badgen-url.js
    108B
  • readme.md
    3.2KB
  • dev-server
  • index.js
    485B
  • readme_node-api.md
    1.6KB
内容介绍
# 🛰 Github CDN [![GitHub stars](https://img.shields.io/github/stars/privatenumber/github-cdn.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/privatenumber/github-cdn) [Github CDN](https://github-cdn.now.sh) is [UNPKG](https://unpkg.com/) for Github — an unofficial content delivery network for repo assets on Github. ## ⭐️ Features - Fetch repo meta-data: branches, tags, and PRs - Serve repo and Gist files - Instant access to new changes pushed to Github * - Great for quick prototyping / development - Includes [npm excluded files](https://docs.npmjs.com/using-npm/developers.html#keeping-files-out-of-your-package) - [Node API](https://github.com/privatenumber/github-cdn/blob/master/readme_node-api.md) for compatibility with Github Enterprise _* Unless the request fails due to network failure or rate-limiting_ ## 💁‍♀️ Endpoints - `/:owner/:repo` - Get the default branch and all refs (branches, tags, and PRs) - eg. [`/vuejs/vue`](https://github-cdn.now.sh/vuejs/vue) to retrieve meta data on [vuejs/vue](https://github.com/vuejs/vue) <details> <summary><i>Example output</i></summary> ```json5 { "default_branch": "master", "refs": { "heads": { ... }, "tags": { ... }, "pull": { ... } } } ``` </details> - `/:owner/:repo/:ref` - Resolve repo ref if semver. Redirects to root of repo ref - eg. [`/vuejs/vue/master`](https://github-cdn.now.sh/vuejs/vue/master) - eg. [`/vuejs/vue/^2.0.0`](https://github-cdn.now.sh/vuejs/vue/^2.0.0) - eg. [`/vuejs/vue/latest`](https://github-cdn.now.sh/vuejs/vue/latest) - `/:owner/:repo/:ref?badge` - Resolves the ref and redirects to [Badgen](https://badgen.net) - eg. `/vuejs/vue/latest?badge` ![Latest Vue badge](https://github-cdn.now.sh/vuejs/vue/latest?badge) - `/:owner/:repo/:ref/:path` - Get a file or list directory in a repo ref - eg. [`/vuejs/vue/v2.6.11/dist/`](https://github-cdn.now.sh/vuejs/vue/v2.6.11/dist/) - eg. [`/vuejs/vue/v2.6.11/dist/vue.min.js`](https://github-cdn.now.sh/vuejs/vue/v2.6.11/dist/vue.min.js) - `/gist/:gist-id` - Get meta-data on a Gist: url, owner, created/updated date, and files - eg. [`/gist/feff40b0a522f0c41c4eff0b77ea1d47`](https://github-cdn.now.sh/gist/feff40b0a522f0c41c4eff0b77ea1d47) - `/gist/:gist-id/:path` - Get a file from a Gist - eg. [`/gist/feff40b0a522f0c41c4eff0b77ea1d47/tulip.jpg`](https://github-cdn.now.sh/gist/feff40b0a522f0c41c4eff0b77ea1d47/tulip.jpg) - `/ratelimit` - See the rate limit quota available on the Github API - With rate limiting, **Github CDN is not a production-ready solution** to hosting code ### 🔑 Setting a custom token (for rate-limiting & private repos) Use a [Personal access token (PAT)](https://github.com/settings/tokens) to access your private repos and to use your [rate limit quota](https://developer.github.com/v3/#rate-limiting). _This token is only stored in your browser as a cookie._ <!-- insert-token-input --> --- Built and maintained by [@privatenumber](https://github.com/privatenumber) [![GitHub followers](https://img.shields.io/github/followers/privatenumber.svg?style=social&label=Follow)](https://github.com/privatenumber?tab=followers) and powered by [Vercel](https://vercel.com) ❤️
评论
    相关推荐