I want to have their own CDN warehouse it? Get come with it!

I. Introduction

  • CDNStands Content Delivery Network, that is 内容分发网络;
  • CDNIt is built on top of existing network infrastructure 智能虚拟网络, relying deployed around the edge server, through the center of the platform 负载均衡, 内容分发, 调度and other functional modules;
  • It allows the user to obtain the desired content nearby, 降低network congestion, 提高user access 响应速度, and 命中率. The key technology of CDN main 内容存储and 分发技术.

  • In this paper, jsDelivr + Github CDN build a free personal library.

    Good article remember 收藏+ 点赞+ 关注amount! ! !

---- Nick.Peng


Second, build a CDN warehouse in Github

  • In the new CDN Github repository, as shown:
    Here Insert Picture Description

  • Copy the address of the warehouse CDN created
    Here Insert Picture Description

  • Clone remote repository to a local
    in the local directory, right Git Bash Here, execute the following command:
    git clone https://github.com/NickyangPeng/CDN.git

  • Upload resource
    to our existing static img and js resources, copied to the CDN directory
    Here Insert Picture Description
    under the local git repository directory Right Git Bash Here, execute the following command:

    git status                    //查看本地仓库状态
    git add .                     //添加所有文件到暂存区
    git commit -m 'First commit'  //把文件提交到本地仓库
    git push                      //推送至远程仓库
    
  • Published CDN resources, as
    Here Insert Picture DescriptionHere Insert Picture Description

Three, Github + jsDelivr use

  • The static resources on Github CDN warehouse converted to quickly access web site, as follows:
    https://cdn.jsdelivr.net/gh/你的用户名/你的仓库名@发布的版本号/文件路径
    For example:
    https://cdn.jsdelivr.net/gh/NickyangPeng/CDN/img/avatar.jpg
    Re: CDN behind if you do not use the version number, the directly refers to the latest resources;
    Here Insert Picture Description
Published 174 original articles · won praise 663 · views 470 000 +

Guess you like

Origin blog.csdn.net/PY0312/article/details/104890536