Start building with Functions and Assets
Traffic to a communications-based application is unpredictable, and properly scaling for spikes is difficult. Functions and Assets is a serverless environment for your Node.js code and static files that handles scaling, hosting, and maintenance for you so that you can focus on your application code instead of stressing about server uptime. Find the documentation, sample code, and developer tools needed to build something amazing.
Take the next steps with Functions and Assets
const axios = require('axios');exports.handler = async (context, event, callback) => {const twiml = new Twilio.twiml.MessagingResponse();const response = await axios.get('https://dog.ceo/api/breeds/image/random');twiml.message(`Hello, ${event.From}! Enjoy this doge!`).media(response.data.message);return callback(null, twiml);};
Take the next steps with Functions and Assets
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 the Twilio Console to get started!
Quickly bootstrap a functional app using our templates
1# Install the Twilio CLI2npm install -g twilio-cli3# Install the Serverless plugin4twilio plugins:install @twilio-labs/plugin-serverless56# Initialize a new project based off of a pre-configured7# template and configure it8twilio serverless:init example --template=hello-messaging9cd example1011# Deploy your app in seconds!12twilio serverless:deploy
Start building with Functions and Assets
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.
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.
Use these tools to solve problems before they crop up and compliment your serverless application with greater capabilities.
Don't want to code? Create apps with our visual builder
Product documentationGive your serverless apps persistent, flexible storage
Product documentation