preface

As a development learner, it is essential to have a website of their own, and for many entry-level developers, eager to have a website of their own, but also distressed at the problems of website construction and server deployment. When I deployed my website for the first time, I spent nearly 100 dollars to buy a student server. After that, I followed the nginx tutorial and Linux statements on the Internet and spent a week to petition on the public network (leaving tears). It was even more complicated to deploy SSL certificate and configure HTTPS.

Webify explore

But times are changing, Tencent cloud recently launched Webify (WEB application hosting) to achieve fast site construction. My first small application was made using cloud development. So for Tencent cloud, I am very willing to try new technology, so I explored it. I had no idea how easy it was to build a website. I built a Hexo blog in ten minutes.

In field

The deployment of

First we enter Tencent cloud official website, search web application hosting

In the template, almost all front-end development frameworks and some document templates are covered. In this case, I choose Hexo. For Hexo, you can go to the official website.

Link to hexo’s website

After selecting the template, we need to select a repository of a code hosting platform to host our site code, or import the code directly if we already have a repository. Here I choose Gitee, which is faster to visit in China.

Then we just need to wait for the deployment, which will speed up the configuration of our site, domain name and some CDNS, and when the deployment is complete we can get an HTTPS domain name!

Click on the domain name and you can see the initial template for Hexo, and our site has been deployed.

The development of

Of course, the deployment alone is not useful, our focus is on the experience of development, we entered the repository we just chose to host code, TCB initialized the code template for us, if we want to develop directly from the repository Git Clone down, development.

Another point to mention here is continuous deployment. Webify set up webhooks for us when we used the template to generate the site, so if we need to deploy after modifying the code, all we need to do is trigger the hook with Git push and the code will be automatically deployed to the application hosted site!

For example, if we are developing a vUE project, the traditional way is that after the project is completed, we need tonpm run buildPackage, then upload the DIST file to our server, and then push the source code to the repository. While the use of thewebhookWhen we put the codepushWhen you go to the repository, you can set up triggered scripts, such as automatic packaging operations, automatic uploading of packaged files to the specified file path on the server, and so on, combining hosting and deployment.

The above picture is the prompt of Tencent cloud console when I submit the code. However, after the deployment was completed, I found that my blog was not updated immediately, and I saw the official reason later

My application has been redeployed, why is the page not updated?

Each application has a CDN cache with a default cache time of 10 minutes. After an application is updated, the CDN cache is not updated immediately. It may take up to 10 minutes for the CDN to update the cache.

conclusion

Webify this tried to create the site and hosting site is more convenient than traditional way, but this is just create a simple blog application, behind I can can can try try to deploy a complete web application the technology is there any bottlenecks, generally simplify the deployment process for developers to reduce a lot of the operation of the operations, Let developers focus more on their business!

I am oil Oyou, a newcomer. My personal blog has been set up as mentioned above, and I will buy a domain name to meet you. There will be front-end related technical output every week.