In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use Wintersmith + Serverless Framework to quickly create a personal site, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
First, let's introduce that Wintersmith is a simple and flexible static site generator. Build with markdown, which is our basic condition.
Serverless Framework: with 30, 000 stars on GitHub, it is a very popular serverless application framework in the industry. Developers can deploy a fully available Serverless application architecture without paying attention to the underlying resources.
Ensure that the system contains the following environments:
Node.js (Node.js version should be no less than 8.6, version 10.0 or above is recommended)
1. Install Serverless Framework$ npm install-g serverless2. Install wintersmith$ npm i wintersmith-G3. Create a new wintersmith project
You can install the specified path
$wintersmith new
After successful initialization, you can see the project file created under the path
4. Local preview
Run the following command and visit http://localhost:8080 through the browser to easily preview the effect, and provide LiveReload function, you can preview in real time.
$wintersmith preview
Use the following command to build the website:
$wintersmith build5. Configure the yml file
Under the project directory, create the serverless.yml file:
$touch serverless.yml
Write the following to the yml file above:
# serverless.ymlmyWebsite: component:'@ serverless/tencent-website' inputs: code: src:. / build index: index.html error: index.html region: ap-guangzhou bucketName: my-bucket
After the configuration is complete, the file directory is as follows:
.├── build | ├── index.html | └── README.md └── serverless.yml6. Deployment
Deploy through the sls command, and you can also add the-debug parameter to view the information during the deployment process:
$sls-debug
If your account is not logged in or registered with Tencent Cloud, you can log in and register directly through the QR code in the command line scanned by Wechat. This is also a place that I think is very convenient!
During deployment, the terminal displays information to indicate:
Visit the url output from the command line to view the website deployed using Serverless Framework ~
Although this is a very simple example, it is not difficult to see the power of Serverless Framework in rapid deployment. For example, the integration of Wechat scanning QR code directly allows us to avoid the tedious process of account registration and configuration of cloud services. What you need to do is to customize the website according to Wintersmith's own ability.
After reading the above, have you mastered how to use Wintersmith + Serverless Framework to quickly create a personal site? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.