If you know me well then you probably know how in love I am with serverless backends, cloud functions, lambdas, and whatever other fancy names they can give for basically a pay-only-for-what-you-use server. I'm also pretty fond of the Serverless Framework (https://github.com/serverless/serverless) which let's you easily scaffold out a new project meant to be run on a serverless architecture. Although I've only been using it for AWS Lambda, I recently made a little mistake that turned out to be a great discovery, and in this post I'll tell you all about it!
A Surprisingly Good Mistake
If you use the --template flag and put it in template name that does not exist then it shows you all the possible templates you can use!
Loads Of NodeJS Hosting Options
A lot of people have in their mind a negative connotation for the word "framework". They think that using a framework may lock you in with a certain server hosting provider and be unable to switch if needed. However, serverless is quite the opposite. In fact, there are currently 7 other hosts besides AWS that you can use :
- Amazon AWS
- Google Cloud Function
- Microsoft Azure
- IBM Open Whisk
- Spot Inst
Python Options Too!
If Nodejs isn't your cup-a-tea, and you'd like to use python to make serverless functions, you can! The serverless framework has templates for aws (python 2 and python 3), kubeless, openwhisk, and spotinst so be sure to check them out if you want to use python!
Other Languages Supported By Serverless Templates
I was amazed by the vast spectrum of languages that you can choose for serverless templates.
And Don't Forget My Favorite, ClojureScript
I couldn't help myself from mentioning that you can also use Clojurescript for your serverless functions! Yeah buddy! With Clojurescript, however, you don't use the standard serverless command line tool. Instead you use leiningen, a build tool that's super popular in the Clojure world.
Get To Making Some Serverless Funcions!
Now that you know about these awesome scaffolding tools, you have no reason not to get to building a serverless function in your favorite programming language. Post in the comments below if you have any questions!
The posts on this site are written and maintained by Jim Lynch. About Jim...