In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to deploy Serverless Framework code with one click. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
We can only set up new projects and deployments through the CLI command line. We need to understand CLI before we can deploy serverless applications. It is unfriendly to many novice users and has a threshold. To this end, we have introduced an one-click deployment function, which greatly facilitates beginners or users who like to operate through the UI interface, and reduces the possibility of operational errors.
The new version of Serverless Framework currently supports one-click code scan deployment of three templates: scf, express and website.
Take express as an example, visit: https://serverless.cloud.tencent.com/deploy/express
If your Tencent Cloud account has not been logged in, scan it with Wechat and authorize the login to deploy.
If you have logged in to your Tencent Cloud account, as shown in the figure below, just click "start deployment".
Go to the deployment status page, as follows:
After the deployment is successful in 3 / 5 seconds, you can see the relevant information of our deployment, as follows:
Visit output apigw.url and you can see that a "hello express" framework application has been successfully deployed.
{"msg": "Hello Express, Request received: GET-/"}
Next we officially develop!
Directly click the red button "download Project Code" above to download the newly deployed project code to the development environment. In this example: express-demo.zip
Make sure that serverless is installed in the development environment, and partners who have not installed it can refer to the following ways to install it.
MacOS/Linux system: binary installation is recommended
$curl-o-L https://slss.io/install | bash
Windows system: can be installed through npm
$npm install-g serverless
Decompress express-demo.zip to a directory (such as demo), and the directory structure under demo is as follows:
| |-src | ├── app.js | ├── node_modules | └── package.json └── serverless.yml |
Write your code under demo/src and execute the serverless deploy command in the demo directory, a QR code will pop up, and your business can be deployed by scanning the code.
# sls deployserverless ⚡ frameworkAction: "deploy"-Stage: "dev"-App: "expressApp"-Instance: "express-api" region: ap-guangzhouapigw: serviceId: service-90rvriiy subDomain: service-90rvriiy-1259787414.gz.apigw.tencentcs.com environment: release url: https://service-90rvriiy-1259787414.gz.apigw.tencentcs.com/release/scf: functionName: express_component_5ya963d runtime: Nodejs10.15 namespace: default10s > express- Api > Success is here to share how to deploy Serverless Framework with one click. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.