Railway Functions Blew Me Away.
A look at Railway functions - the most convenient way I've seen to deploy serverless functions & how I implemented a blog post view counter using them.
Intro + Background
I've been using Railway for a while now for pretty much everything I build. Usually a Postgres DB + a docker containerized server. This has worked out great for me, and I love the convenience, and ecosystem that Railway provides. In this blog post I want to cover what Railway functions are, how you can get started with them, and a quick walk through of how I implemented a blog post view counter using them.
What are Railway functions?
If you're familiar with AWS Lambda, Railway functions are very similar with a few added conveniences, limitations, and benefits.
Getting started with Railway Functions
One of my favorite things about Railway is how easy they make their infra tools to use. To use railway functions you'll want to head to railway.com and sign up/login (you can use your GitHub account). Then create a new empty project, click add a service, and select function. You can edit the function code in the built-in editor, and then deploy it to the cloud. Ridiculously simple huh? Bonus: While working on this post, they shipped the ability to query claude from within the editor, love it!
The biggest use cases I see for Railway functions at the moment
Lots honestly, the ability to spin up a function in a few clicks at buns lightning speed is really awesome. I'll list a few of the biggest use cases I see for them at the moment:
- Mostly static sites with a few dynamic bits
- Simple API's
- Cron jobs
- DB migrations
- Testing a new feature