This repository contains a project with a sample “Hello, World!” function written in Node.js JavaScript.
Sample Functions
Validated on 23 May 2022 • Last edited on 17 Apr 2025
Functions are blocks of code that run on demand without the need to manage any infrastructure. Develop on your local machine, test your code from the command line (using doctl
), then deploy to a production namespace or App Platform — no servers required.
These repositories contain sample functions that you can deploy as components to App Platform. Each repository contains the necessary app-spec.yaml
for App Platform and the requisite project structure, including project.yml
.
Node.js Example Projects
This repository contains a project with a sample QR code generator function written in Node.js JavaScript.
Python Example Projects
This repository contains a project with a sample “Hello, World!” function written in Python.
This repository contains a project with a sample API that returns jokes written in Python. It includes Pip requirements and a build script.
This repository contains a project with a sample API that sends SMS messages using Twilio written in Python.
This repository contains a project with a sample API that sends emails using SendGrid written in Python.
PHP Example Projects
This repository contains a project with a sample “Hello, World!” function written in PHP.
This repository contains a project with a sample API that converts numerals to words written in PHP. It includes a required Composer library and a build script.
Go Example Projects
This repository contains a project with a sample “Hello, World!” function written in Go.
This repository contains a project with a sample Go function that connects to a MySQL database.
This repository contains a project with a sample API that returns a presigned URL to upload or download a file to or from a DigitalOcean Space written in Go.