Below you can find RisingStack's collection of the most important Node.js updates, projects & tutorials from this week:
- Experimental support for the built-in http2 has been added via the --expose-http2 flag.
- require() is available in the inspector console now.
- Multiple contexts, as created by the vm module, are supported now.
- New APIs for creating number values have been introduced. #14573
- For Duplex streams, the high water mark option can now be set independently for the readable and the writable side.
- util.format now supports the %o and %O specifiers for printing objects.
Learn what are the benefits and best practices of API Gateways for microservices, and how you can start building yours using Node.js.
Services in a microservices architecture share some common requirements regarding authentication and transportation when they need to be accessible by external clients. API Gateways provide a shared layer to handle differences between service protocols and fulfills the requirements of specific clients like desktop browsers, mobile devices, and legacy systems.
A Node queue API for generating PDFs using headless Chrome. Comes with a CLI, S3 storage and webhooks for notifying subscribers about generated PDFs
pdf-botis installed on a server and will receive URLs to turn into PDFs through its API or CLI.
pdf-botwill manage a queue of PDF jobs. Once a PDF job has run it will notify you using a webhook so you can fetch the API.
pdf-botsupports storing PDFs on S3 out of the box. Failed PDF generations and Webhook pings will be retryed after a configurable decaying schedule.
This fast, small, zero dependency package is all you need to enable ES modules in Node 4+ today.
I’m excited to announce the release of @std/esm (standard/esm), an opt-in, spec-compliant, ECMAScript (ES) module loader that enables a smooth transition between Node and ES module formats with near built-in performance!
This article talks about the DOs and DON’Ts of Node config handling.
When building any kind of server side app, you will eventually have the following thoughts:
- I would like to bind my app to a specific port.
- I would like to enter a connection string so I can connect to my database.
- I would like to use a third-party service through a provided API key or credentials.
Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.
What can it do?
Most things that you can do manually in the browser can be done using Puppeteer! Here are a few examples to get you started:
- Generate screenshots and PDFs of pages.
- Crawl a SPA and generate pre-rendered content (i.e. "SSR").
- Scrape content from websites.
- Automate form submission, UI testing, keyboard input, etc.
- Capture a timeline trace of your site to help diagnose performance issues.
Early July this year, Node.js released a security update for all currently maintained branches to address a hash flooding vulnerability. This intermediate fix comes at the cost of a significant startup performance regression. In the meantime, V8 has implemented a solution which avoids the performance penalty.
In this post, we want to give some background and history on the vulnerability and the eventual solution.