Movatterモバイル変換


[0]ホーム

URL:


Skip to contentSkip to navigationSkip to topbar
Go to the Twilio Docs home page
Twilio Docs
1
Twilio servers
2
Your app
constaxios=require('axios');
exports.handler= async(context,event,callback)=>{
consttwiml= newTwilio.twiml.MessagingResponse();
constresponse= awaitaxios
.get('https://dog.ceo/api/breeds/image/random');
twiml
.message(`Hello, ${event.From}! Enjoy this doge!`)
.media(response.data.message);
returncallback(null, twiml);
};
3
Hello, +2134567890! Enjoy this doge!

Take the next steps with Functions and Assets


Get Started

You're just a few clicks away from deploying a Function that can scale to any number of incoming SMS, Calls, and more. No need to deploy or manage your own server. Let's get started!

You can also use the Twilio CLI and Serverless Toolkit to quickly deploy a pre-made app template, or bootstrap your own app from scratch.

If you prefer a GUI, no worries, just visit theTwilio Console to get started!

Quick-DeployDevelop and run locally

Quickly bootstrap a functional app using our templates

1
# Install the Twilio CLI
2
npminstall-gtwilio-cli
3
# Install the Serverless plugin
4
twilioplugins:install @twilio-labs/plugin-serverless
5
6
# Initialize a new project based off of a pre-configured
7
# template and configure it
8
twilioserverless:init example--template=hello-messaging
9
cdexample
10
11
# Deploy your app in seconds!
12
twilioserverless:deploy

Understand the Concepts

Learn how Functions and Assets works to provide scaling, reliability, and flexibility for your app. Building an application in Functions and Assets has some key differences from building on your own server using Express or Flask. Set yourself up for success by learning the key concepts and JavaScript methods that you'll be interacting with on your development journey.

Use these docs to learn about Functions and Assets core concepts, the different steps involved in building in the cloud, and examples of common use cases.


Explore the Serverless Toolkit

The Serverless Toolkit is CLI tooling to help you develop locally and deploy to Twilio Functions and Assets.

If you want to streamline your workflow, bootstrap and deploy apps quickly, easily integrate with your own CI/CD pipeline, and develop from the comfort of your own IDE, then the Serverless toolkit will be the Twilio CLI plugin for you.


Related products

Use these tools to solve problems before they crop up and compliment your serverless application with greater capabilities.


[8]ページ先頭

©2009-2025 Movatter.jp