Please select a provider: Alibaba Cloud (alibaba)
Input your AccessKeyID & AccessKeySecret
Edit `s.yaml`
yaml
edition: 3.0.0 name: my-app access: 'default'
vars: region: 'us-west-1'
resources: my-app: component: fc3 props: region: ${vars.region} functionName: 'my-app' description: 'Hello World by Hono' runtime: 'nodejs20' code: ./dist handler: index.handler memorySize: 1024 timeout: 300
Edit `scripts` section in `package.json`:
json
{ "scripts": { "build": "esbuild --bundle --outfile=./dist/index.js --platform=node --target=node20 ./src/index.ts", "deploy": "s deploy -y" } }
## 4\. Deploy [](#_4-deploy)
Finally, run the command to deploy:
sh
npm run build # Compile the TypeScript code to JavaScript npm run deploy # Deploy the function to Alibaba Cloud Function Compute