Ruby in Netlify Functions

OK folks — this is a pre-pre-release, but I think I’ve gotten it off to a pretty decent start now. I’ve been working on a micro-framework called Phaedra that’s well-suited for use in serverless function contexts (and also Docker). In a nutshell, you can add /api/* to your Bridgetown (or Jekyll, or Middleman) sites. :smiley:

There’s a section in the Readme about how to use Netlify’s proxy rewrites to set up the /api endpoint. One easy way to get Phaedra up and running to use use Fly.io. Using Docker you can deploy the API app to a global network of container hosts in minutes.

I could envision this being super helpful for providing services like authentication, paywalled content, payment processing (Stripe, etc.), and other bits of functionality on the “A” side of JAMstack.

Another thing I’ve been experimenting with is connecting to a MongoDB database using something like ScaleGrid or Atlas. Makes it super-easy to store and retrieve JSON “in the cloud” right from your Ruby API.

Anyway, I welcome your feedback and suggestions!

1 Like