Skip to content

Instantly share code, notes, and snippets.

@ErikAndreas
Last active March 27, 2018 08:59
Show Gist options
  • Save ErikAndreas/83841d8558bdb764a3aa9ce905a004f3 to your computer and use it in GitHub Desktop.
Save ErikAndreas/83841d8558bdb764a3aa9ce905a004f3 to your computer and use it in GitHub Desktop.
Serverless, FaaS

Azure Functions (release 2, beta)

PROS

  • the only "big" provider supporting node.js LTS 8 (aws and gcp still on 6.x)
  • automated deploy using git (tested w bitbucket), use different function apps per env (dev, stage, prod etc) and map against branches
  • local dev environment

CONS

Stdlib

PROS

  • intuitive-ish, most things work as expected
  • faaslang standard
  • env.json file read by code as standard process.env.KEY

CONS

  • hard to google (<stdlib.h>)
  • many outdated articles/tutorials
  • scheduling requires "release"
  • limited options for scheduling
  • "release" means published in registry, might not be for everyone

Webtask.io (Auth0)

PROS

  • The editor is rather full featured, simple functions could do without wt cli

CONS

  • no environment variables, uses "secrets" editable from editor and read by code as context.secrets.KEY which also means you can't use secrets outside of your function, e.g one-off inits.
  • need to use "bundle" feature of wt-cli to deploy (it builds a new output file of your files) any local dependencies, e.g anything you require('./yourdep').

Gotcha

  • webtask function parameter list will impact parsing of request data body; (context, cb) body will be parsed and stored in the context.body, (ctx, req, res) requst body will be left unread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment