curl -X GET https://large1.faasplus.com/acme/demo/ping
export async function handler(event) {
const executedAt = new Date().toString();
return {
res: 'pong',
executed_at: executedAt
};
}
{
"res": "pong",
"executed_at": "Thu Sep 12 2024 12:43:23"
}
With FaasPlus, turning your JavaScript and JSON knowledge into powerful, scalable cloud functions is effortless. No complex setups or steep learning curves—just write your code, deploy, and watch it scale. FaasPlus streamlines the function-building process, so you can focus on creating, not managing infrastructure. It’s your favorite languages, now supercharged for the cloud.
Built with enterprise-grade security and scalability from day one
Secure your endpoints with NONE, BASIC, API_KEY, or IP_BASED authentication. Choose the right security level for each function.
Protect your functions from abuse with configurable rate limits. Control requests per IP and per endpoint automatically.
Automatic Server-Side Request Forgery protection. Private IPs are blocked by default, keeping your infrastructure secure.
Auto-heal system ensures continuous availability. Functions are automatically restored after engine restarts.
Imagine you receive JSON data with two values, a and b, and you need to calculate their sum. With FaasPlus, it's as simple as writing a few lines of JavaScript.
In this case, FaasPlus extracts the values from the JSON, performs the calculation, and returns the result—all in one seamless function. This showcases how easily FaasPlus handles real-world scenarios where working with JSON data is essential, letting you focus on logic while it manages the heavy lifting.
curl -X POST https://large1.faasplus.com/acme/demo/sum \
-H 'Content-Type: application/json' \
-d '{"a":10,"b":20}'
export async function handler(event) {
const a = event.body?.a || 0;
const b = event.body?.b || 0;
const sum = a + b;
return {
sum: sum
};
}
{
'sum':30
}
With FaasPlus, you can effortlessly interact with external APIs and services using JavaScript’s built-in fetch. Whether you're retrieving data from third-party services or posting data to external APIs, FaasPlus gives you the flexibility to seamlessly integrate external resources into your functions. For example, making an HTTP request to fetch external data is as simple as:
curl -X GET https://large1.faasplus.com/acme/demo/ext-call?postId=1
export async function handler(event) {
// Request postId as parameters (query string)
const postId = event.params?.postId || 1;
// Request external data using global fetch
const res = await fetch(`https://jsonplaceholder.org/posts/${postId}`);
// Read as JSON
const jsonRes = await res.json();
// Add additional field
const executedAt = new Date().toString();
// Compose new result
const myRes = {
id: jsonRes.id,
slug: jsonRes.slug,
executedAt: executedAt
};
return myRes;
}
{
'id':1,
'slug':'condimentum.',
'executedAt':'Wed Sep 11 2024 11:13:10'
}
FaasPlus goes beyond basic functions. You can easily use query string parameters to fine-tune your inputs and leverage workspace variables to securely store project URLs, secrets, and other sensitive data. Need to make SOAP calls? No problem—FaasPlus supports that too, allowing you to integrate with a wide range of services. From handling complex APIs to managing secure environments, FaasPlus has you covered. See all use cases (examples).
See all use cases (examples)Sign Up and Start Using FaasPlus Now—It’s Free! Getting started with FaasPlus is quick and easy. Signing up takes just a few seconds, and you can begin building and deploying functions right away at no cost.
Get started