You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Quick start
Create applications by using templates
Copy page
Download PDF
Create applications by using templates
This topic describes how to quickly create an application by using an application template in veFaaS CLI.​
Prerequisites​
The CLI has been installed, and other preparations have been completed. For details, see Preparations and Installing the CLI.​
Procedure​
  1. Log in to the veFaaS CLI.​
tip​
If you use CLI for the first time, you will be prompted to enter AK/SK for authentication.​
​
vefaas login​
> You can obtain credentials from Volcengine IAM​
? Access Key ID (AK): ********************************************​
? Secret Access Key (SK): ************************************************************​
> Credentials have been saved to ~/.vefaas/auth.json​
Congratulations! You are now signed in.​
To deploy something, run `vefaas`.​
​
  1. Select a template to create a project. After selecting a template, you can configure the target directory for pulling the template.​
​
vefaas init​
? Template list (Type to filter, arrow keys to navigate, Enter to confirm, Ctrl+C to cancel.) ›​
> FastAPI - Quickly create and deploy with the FastAPI framework, a fast and efficient web framework for building Python-based APIs.​
Vitepress - A static site generator (SSG) designed for building fast, content-centric sites.​
Express - Based on the Native runtime with built-in Node.js and Express.js frameworks, quickly deploy a publicly accessible web application for users.​
​
  1. Access the folder where the template is pulled.​
​
> Selected template: FastAPI​
? Detected directory 'fastapi' already exists. Initialize the app into a new directory? yes​
? Enter a new directory name fastapi-new​
​
✨ fastapi-new project has been created with the FastAPI template. Next steps:​
> cd fastapi-new​
> Run `vefaas` to deploy.​
​
  1. Deploy an application based on the template.​
​
vefaas​
> No linked application found. Launching link flow...​
? Set up and deploy "~/codebase/faas/playground/fastapi-new"? yes​
? Link to an existing application? no​
? Enter application name fastapi-new-1229​
> You need to select an API Gateway instance to bind your new application.​
✔ Select a running API Gateway (Type to filter, arrow keys to navigate, Enter to confirm, Ctrl+C to cancel.) › faas-application-serverless-gateway​
> Auto-detected or default application settings:​
> - Build Command: ./build.sh​
> - Output Directory: ./​
> - Start Command: ./run.sh​
> - Port: 8000​
> - Runtime: native-python3.12/v1​
? Would you like to modify these settings? no​
> Successfully created and linked application "fastapi-new-1229". Updated config in .vefaas/config.json​
> Linked application: "fastapi-new-1229". Updated config in .vefaas/config.json​
> Package created: packaged "~/codebase/faas/playground/fastapi-new", size 0.01MB​
> Console: Manage this application (https://console.volcengine.com/vefaas/region:vefaas+cn-beijing/application/detail/******)​
> Access URL (available now): https://**********.apigateway-cn-beijing.volceapi.com/​
> Deploy succeeded.​
​
  1. View the access address of the application. After the application is deployed, use the following code to view the access address of the application.​
​
> vefaas domains​
> Access URL (available after deployment): https://*********.apigateway-cn-beijing.volceapi.com/​
> Access URL (available after deployment): https://*********.apigateway-cn-beijing-inner.volceapi.com/​
​
What to do next​
Develop the application by using a template​
  • Node.js runtime​
  1. Initialize the local environment: Run npm i to install project dependencies.​
  1. Start local development: Run npm run start to start the local development service.​
  1. Update and deploy the function: When you need to update the function, run vefaas deploy to complete the deployment.​
  • Python runtime​
  1. Install dependencies: Run pip i -r requirements.txt to install project dependencies.​
  1. Start local development: Run python main.py to start the local development service.​
  1. Update and deploy the function: When you need to update the function, run vefaas deploy to complete the deployment.​
​
> vefaas​
> Linked application: "fastapi-new-1229". Updated config in .vefaas/config.json​
> Package created: packaged "~/codebase/faas/playground/fastapi-new", size 0.01MB​
> Deploy succeeded.​
​
​
Last updated: 2026.08.19 14:06:08