Serverless webhooks in Node 8 with Auth0 Webtasks

Hero Image

Many people know Auth0 Webtasks as the quickest way to set up an HTTP endpoint implemented in Node. Until now, you could write your code using Node 4.x with all public NPM modules.

This week we enabled support for Node 8.

Here is how you can start writing your webtasks in Node 8.

Install and initialize the CLI

If you have not done it already, make sure you have wt-cli installed and initialized against the current Node 4.x sandbox:

sudo npm i -g wt-cli
wt init

Create a Node 8 profile

Now create a new profile for wt-cli that uses the same token and container as the profile created in the previous step, but the sandbox URL of the new Node 8 sandbox:

wt init -p node8 \
  --url \
  --token $(wt profile get default --field token) \
  --container $(wt profile get default --field container)

Webtask away

Use the new node8 profile from the previous step to create webtasks in Node 8:

echo "module.exports = cb => cb(null, process.versions)" > whatnode.js
wt create -p node8 whatnode.js

You will get back a URL to your webtask, which you can then call, e.g.:

tomek$ curl

And of course you can also launch into the Auth0 Extend editor from the command line with:

wt edit -p node8 whatnode

In the editor, you have access to real-time logs, secret management, all NPM modules, and more - all using Node 8.

Auth0 Extend editor

Serverless Framework, Auth0 Extend, and Webtasks is a freemium sandbox of the Auth0 Extend product. Based on the Auth0 Webtasks technology, it offers modern, serverless extensibility solution for SaaS platforms and applications. Think better webhooks.

Until recently the freemium Auth0 Extend sandbox at allowed you to use Node 4.x with all public NPM modules to implement serverless webhooks.

Last week we shipped the Auth0 Webtasks provider for Serverless Framework. On this occasion we provisioned a new version of the Auth0 Extend sandbox, based on the latest version of Node 8.

This post shows how any subscriber to can also use the new, Node 8 environment. Enjoy!


Related Content

2 February 2022
fetch() In Node.js Core: Why You Should Care

Node 17.5 introduces support for the fetch() HTTP client, a new way to send requests to HTTP APIs.

23 February 2022
Node.js Adds Support for Direct Registry-less HTTPS Imports

Node is planning to introduce support for HTTPS imports in Node 18 - a feature that enables you to use urls to directly import modules over HTTPS into your project.

15 February 2022
Run Every Node.js Version in AWS Lambda

Run any version of Node.js in AWS Lambda within hours after release using custom AWS Lambda runtimes from Fusebit