#378 — March 4, 2021

Read on the Web

👋 To help with the 'no big news in the Node world this week' problem we're encountering sometimes, we're interviewing maintainers of different Node projects so you can get a look behind the scenes of their work. This week we have an interview with the maintainer of a Node SOAP library and you can find it at the very end of the issue :-)
__
Peter Cooper, your editor

Node Weekly

Serverless UI: A Command-Line Tool for Deploying Serverless Apps to AWS — If you’d like to deploy functions in a simple, Netlify-style fashion with the Lambda and API Gateway setup handled for you, check this out. It uses AWS CDK under the hood and is a bit more ‘zero-config’ than something like Serverless Framework, say. “Write your serverless functions in JavaScript or TypeScript. Either way, they’ll be bundled down extremely quickly and deployed as Node.js 14 lambdas.” Architect is another tool worth exploring in this space.

Jake Partusch

Node v15.11.0 (Current) Released — Another week, another release, but this is a very minor one (unless you’re running into a bug it’s fixed, of course!) One change of note is that the Node team now consider source maps to be stable and no longer experimental.

Node.js Project

Video for Your Node App That Streams Beautifully, Everywhere — Automatically deliver the best user experience for every combination of device, browser, location, and bandwidth with Mux's video API. Get started with a $20 credit.

Mux sponsor

PSA: fs.promises.readFile is 40% Slower Than fs.readFile — You’re probably not going to care unless you’re doing a lot of file heavy lifting (or are writing a library you want others to depend on for performance) but it’s worth keeping in mind.

Node.js Repository

Deno 1.8 Released — Node’s friendly cousin takes another step forward with, perhaps most notably, experimental support for WebGPU which will open up some interesting use cases for GPU-based computation. → Via our Deno newsletter.

Bartek Iwańczuk, Luca Casonato, and Ryan Dahl

💻 Jobs

Node.js Developer at X-Team (Remote) — Join the most energizing community for developers and work on projects for Riot Games, FOX, Sony, Coinbase, and more.

X-Team

Find Your Next Job Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.

Hired

📗 Tutorials and Stories

Building a Discord Bot Using Discord.js — Node is ideal for building chat bots and here’s a complete walkthrough of using the Discord.js library to do this on the Discord chat system to create a joke posting bot.

Subha Chanda

▶  Computerphile Covers Node.jsComputerphile is a wildly popular YouTube channel that covers computer science and software engineering generally in an accessible way (highlights include Tom Scott talking about timezones and how floating point numbers work.) This isn’t an advanced video by any means but helps put Node into context within the broader computing ecosystem.

Computerphile

An Engineering Leader’s Guide to OpenTelemetry

Lightstep sponsor

Unzip Large Files in AWS S3 using Lambda and Node.jsUnzipper is a helpful package here as its streaming approach promises a low memory footprint even when decompressing large files.

Nery Chucuy

Securing Node Services using Client Authenticated TLS with CATKeys

Pommy Mac

🛠 Code and Tools

Agenda 4.1: Lightweight Job Scheduling for Node — Uses a MongoDB-backed persistence layer and offers rate limiting, pause/resume, repeatable jobs, and even a UI/dashboard if you need it.

Ryan Schmukler

array-union 3.0: Create An Array of Unique Values, In Order, From Input Arrays — A project with 21 million npm downloads per week and 33 GitHub stars is quite the thing :-) This new 3.0 version is now a pure ESM package.

Sindre Sorhus

Get Your Free SPOTcon 2021 Tickets Today — Join us March 26 for Scout APM's digital event on performance & observability. Speaker lineup and agenda now available.

SPOTcon by Scout APM sponsor

Chevrotain 8.0: A Parser Building Toolkit — The tutorial walks through building a simple parser for an SQL-esque language. Basically if you need to turn some sort of code into a usable AST, this is worth a look.

SAP

walk-back 5.0: Walk Up The Directory Tree Until a Specified Path/File is Found

Lloyd Brookes

haxec 2.0: Wrap spawn() or exec() with Before/After Handlers — Designed for executing other Node programs as before and after handlers get injected.

Gustaf Räntilä

address-rfc2822: RFC 2822 & 5322 (Header) Email Address Parser

Sergeant, Simerson, et al.

SOAP began life as XML-RPC over twenty years ago and is an XML based remote procedure call system that's reasonably common in large, enterprise APIs and was a defacto standard prior to REST and JSON. easy-soap-request is a library that makes it easier to perform SOAP calls from Node, and we caught up with its creator to ask a few questions:

Why did you create easy-soap-request rather than use an existing library?

I was working on a project at a large insurance company and needed to stitch together some legacy APIs for automated testing, but all I could find were implementations in Java. At the time, my team was using Node.js more so I wanted to build this new automation with more modern tech, but what I found is that there isn't really a lot of documentation around using SOAP with modern solutions. The library really took off when I wrote a Medium article explaining how to use SOAP APIs.

There are several existing SOAP clients, but they were difficult to use and the documentation was very verbose. At the end of the day, I just wanted to send a POST request and thought "it shouldn't be this hard".

In what sort of places is SOAP still used?

SOAP really became a thing in the early 2000s, so many companies who have been around since then (especially larger ones) will most likely still have some APIs based on SOAP. Companies in industries such as finance, banking, insurance, government agencies etc. are most likely to still have SOAP-based APIs. Just like how those same companies still have mainframes.

How did you find the process of supporting Node, Deno and the browser all in one library?

That's an interesting question because I never actually intended for that. Each sector of the JS ecosystem has its own convention which helped a lot. The project originally started as a simple Node library so I naturally published it to npm. Then I saw several browser use-cases and integrated webpack into the build process which published the bundle in a dist/ path in the node module.

npm already did the heavy lifting by pushing it to a CDN for me, so the browser library was just accessible via dist/ instead of the root path. Once Deno was inching closer to 1.0, a user opened an issue asking for support. I thought it was a reasonable ask so I figured why not. Deno modules allow you to access modules by any individual file name over HTTPS so I chose index.d.js which I think makes sense.

Most tooling today will allow enough customization for you to solve these types of problems easily, but the trick is to making consumption very clear to the user. That means implementing standarized conventions that developers are already using and good documentation. If you don't have some quick copy/pasta usage in your README, developers are much less likely to use what you've built.

You can find out more about Caleb and his work here.