Node v20.6.0 released with .env support

September 5, 2023 By Mark Otto 0

Node.js Weekly

Node v20.6.0 (Current) Released — As we teased last week, the latest Node release includes all-new built-in support for setting environment variables via .env files, so you may no longer have a need for dotenv, depending on your use case. You can now also use import.meta.resolve to get an absolute URL string to a specified module, plus there are some enhancements around module customization hooks.

Juan José and the Node.js Team

💡 If you just want to see a quick example of the .env feature in action, Phil Nash comes to the rescue here and also outlines some of the missing features.

A Modern Introduction to Node.js — Take your JavaScript to server-side coding with CLI development, file I/O, async coding, CRUD operations, testing with Jest, and creating servers!

Frontend Masters

My Node.js is a Bit Rusty.. — The tale of how replacing a Node.js module with a native Rust module resulted in a 25x perf boost for Wix. Gal shows off the details of how it came about before concluding: “If something is too slow, profile it first, then encapsulate it, and then—perhaps—consider rewriting it in Rust.”

Gal Schlezinger

Using Rust alongside Node is an increasingly popular technique. You can read more on the topic in Exposing a Rust Library to Node with Napi-rs or by watching ▶️ Creating Node.js libraries with Rust using Neon.

Choosing the Best Node.js Docker Image — If you feel tempted to just throw FROM node into your Dockerfile, think again – there are other options to consider. (An article we first posted in 2022 but which has had an August 2023 update.)

Liran Tal (Snyk)

How to Use SSL/TLS Pinning in Node — SSL/TLS pinning adds an extra layer of security to connections between your apps and remote servers by storing certificates and keys for connections, thus reducing the potential for MITM attacks.

Nwani Victory

Tracking Errors in a Node App — A look at how to track errors in a Node app in a “convenient, automated, and safe way”.

Rishabh Rawat (AppSignal)

🛠 Code & Tools

Benchmarking 24 CSV Parsing Approaches — Certainly the most extensive Node.js CSV parsing benchmark I’ve seen. The author, himself the creator of the μDSV CSV parsing library, wanted to contest the common ‘lightning fast performance’ claims of other CSV parsing libaries. Unsurprisingly, μDSV tends to win in all but a couple of cases.

Leon Sorokin

📰 Classifieds

📅 Next week, Semaphore presents the online CI/CD Express Conference, an online CI/CD conference for engineering leaders (and it’s free).


💻 Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.

📢 If you have a community related event, project, podcast, or similar, that would be of interest to Node Weekly readers, let us know by replying to this email and we may be able to run a classified listing as above for free. We want to have a good mix of community and commercial listings.

QUICK RELEASES: