StdLib Platform Updates: Functions Run on Node 8.9.1, Static Binary Support

Jacob Lee Blocked Unblock Follow Following Nov 27, 2017

Hey everyone! The StdLib team is in Las Vegas for this year’s AWS:reInvent conference (give us a shout @StdLibHQ if you’re here too!), but we’re still hard at work improving the platform.

I’m therefore excited to announce some platform updates! We’ve increased the number of npm packages we support in our functions by adding support for packages that depend on static binaries — this includes useful ones such as SDKs for Firebase administration, Google Datastore, and PhantomJS. We’ve also updated the default Node engine to Node 8.9.1.

If you’re not familiar with StdLib, we’re a function as a service (FaaS) library that allows users to rapidly create, discover, and consume APIs as web functions. We’re the fastest way for developers to turn their code into a live, infinitely-scalable, production-ready endpoint. This tutorial on our Github page will walk you through the process of signing up and creating your first service. You can also check out our most recent product, StdLib Sourcecode, which makes creating a wide variety of production-ready projects dead simple.

Static Binary Support

We’re happy to announce today that StdLib now supports packages with static binary dependencies! You can now use them just like any other npm package. For example, to use PhantomJS in your project, you could run npm install phantom --save from your StdLib service directory, then use it within your function. For example, if you wanted a function that spins up an instance of Phantom JS and returns the content of a website, you could do something like this:

StdLib + PhantomJS

In this example, we also log the urls of the sites we visit. You can see these logs using our CLI.

Node 8.9.1 Support

StdLib now ships with Node 8.9.1 as the default engine for functions. To use the previous engine version, you should manually set "engine": "nodejs-8.8.0" in the "stdlib" field of your package.json . You can check out the release notes for Node 8.9.1 here.

That’s it!

We’ve got more exciting features and announcements coming up in the next few weeks, so stay tuned by following us on Twitter @StdLibHQ. You can also join our Slack channel by going to our homepage and requesting an invite under the “Community” tab. Feel free to reach out anytime!