Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

Loads of Templates To Use With The Serverless Framework!

11/19/2017

0 Comments

 
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

So yesterday I went to scaffold out a new project, just a regular es6 Javascript NodeJS function that can be consumed by Amazon Aws Lambda (because that it what I have), and I type in the the wrong command into the terminal. 
Picture
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
- Kubeless
- Microsoft Azure
- IBM Open Whisk
- Spot Inst
- Webtasks

There's also an aws template using typescript and "nodejs-ecma-script" which I'm guessing is for ES6 JavaScript.

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. 

- Scala.js
- C#
- F#
- Php
- Ruby
- Kotlin
- Swift
- Java 

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. 
lein new serverless-cljs example

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!   
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blockchain
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Investing
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    August 2021
    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2021