Join the chat - Getting Started - API Documentation - Blog

Serverless Platform for Ruby Developers

FaaStRuby is the first serverless platform that has Ruby as a first class language. You can do things like:

- Require your favourite gems.
- Setup tests to run automatically before every deploy.
- Schedule functions to run periodically or at any time in the future, using plain english or the Cron syntax.
- Respond to HTTP requests with custom headers, status code and body (HTML, JSON, YAML, you name it!).
- Store encrypted secrets that are handed to your function upon execution.

Do you want to suggest a feature? Write an email.

See it in action

Hosted at Digital Ocean
Run the examples below a few times so you get a sense of the average execution time.

Hello, World!

def handler event
  response = {
    "Hello" => "World!"
  respond_with response

Query Yahoo Weather API

require 'weather-api'
require 'oj'

def handler event
  body = Oj.load(event.body)
  weather = Weather.lookup_by_location(body['location'], Weather::Units::CELSIUS)
  response = { title: weather.title, temperature: "#{weather.condition.temp}C", conditions: weather.condition.text }
  respond_with response

Try it

1. Install the gem:

$ gem install faastruby

2. Create a workspace to deploy your functions. The workspace name must be unique (like a username).

$ faastruby create-workspace awesome-prod

3. Create a function and deploy it to your workspace:

$ faastruby new my-first-function
$ cd my-first-function
$ faastruby deploy-to awesome-prod
◐ Running tests... Passed!

Finished in 0.00563 seconds (files took 0.15076 seconds to load)
3 examples, 0 failures

◐ Building package... Done!
◐ Deploying to workspace 'awesome-prod'... Done!

4. Run it:

$ faastruby run awesome-prod --json '{"name":"Ruby"}'
Hello, Ruby!

You can also generate a CURL command:

$ faastruby run awesome-prod --json '{"name":"Ruby"}' --header 'My-Header: value' --query 'foo=bar' --query 'baz=fox' --curl
curl -X POST -H 'Content-Type: application/json' -H 'My-Header: value' -d '{"name":"Ruby"}' 'https://api.faastruby.io/awesome-prod/my-first-function?foo=bar&baz=fox'

Build lots of functions and share them with fellow Ruby devs!

FaaStRuby + Hyperstack = fullstack Ruby apps!

Think JavaScript is your only option for the front-end? Think again. Hyperstack is a Ruby DSL, compiled by Opal, bundled by Webpack, powered by React.

Who are you?

I'm Paulo Arruda. Who are you?