Node.js Icon

Node.js

Node.js is a tool for executing JavaScript in a variety of environments.
153 Stories
All Topics

Sindre Sorhus blog.sindresorhus.com

Small focused modules

This was from an AMA, but Sindre turned it into a blog post since his response was so popular. Also, his answer applies particularly to Node.js. Sindre writes on his blog: Make small focused modules for reusability and to make it possible to build larger more advanced things that are easier to reason about. And, also… It doesn’t matter if the module is one line or hundreds. It’s all about containing complexity. Think of node modules as Lego blocks. You don’t necessarily care about the details of how it’s made. All you need to know is how to use the Lego blocks to build your Lego castle. By making small focused modules you can easily build large complex systems without having to know every single detail of how everything works.

read more...

Node.js medium.com

The Node.js Foundation and JS Foundation intend to push the merge button

Hot off the press: An intent to merge means that we the boards of both Foundations have agreed to public discussions related to a possible merger. We have not made any formal decisions at this point regarding a new or merged Foundation and its potential organizational structure, governance policies, technical framework or leadership. This will be formalized based on feedback from the Node.js and JavaScript communities. There will be a panel and Q&A at Node+JS Interactive next week and you know that the JS Party crew will be there with the full coverage. 💪

read more...

Yarn github.com

Getting rid of node_modules

The Yarn team is brewing up a new way to resolve dependencies: this RFC a new alternative and entirely optional way to resolve dependencies installed on the disk, in order to solve issues caused by the incomplete knowledge Node has regarding the dependency tree. We also detail the actual implementation we went with, describing the rational behind the design choice we made. Pretty exciting if/when they pull it off. The wins: Installs ran using Plug’n’Play are up to 70% faster than regular ones (sample app) Starting from this PR, Yarn will now be on the path to make yarn install a no-op on CI Yarn will now be able to tell you precisely when you forgot to list packages in your dependencies Your applications will boot faster through a hybrid approach of static resolutions

read more...

Apoorv Saxena github.com

Asynchronously resolve subscribed decisions in a pub/sub architecture (pure JS)

AsyncResolver.js implements a PubSub architecture where subscribers of events are decision makers (return promise when they receive an event) and after publishing an event, publisher gets the decision of the subscribers. Supports both Node and browser. The README has more details on when this might be useful to you.

read more...

Fedor Indutny darksi.de

HashWick V8 vulnerability

Get the backstory on the Hash Seed guessing game and HashWick from Fedor Indutny: About one year ago, I’ve discovered a way to do a Denial-of-Service (DoS) attack on a local Node.js instance. The process involved sending huge amounts of data to the HTTP server running on the same machine as the attacker, and measuring the timing differences between various payloads. Given that the scope of attack was limited to the same machine, it was decided by V8 team and myself that the issue wasn’t worth looking in yet. Nevertheless, a blog post was published. This year, I had a chance to revisit the Hash Seed guessing game with restored enthusiasm and new ideas. The results of this experiment are murky, and no fix is available yet in V8. Thus all V8 release lines are vulnerable to the HashWick attack. Fedor also mentioned that this issue was disclosed responsibly and this blog post was published 90+ days after the initial report.

read more...

Medium Icon Medium

More than a Billion downloads of Node.js 🎉

Node.js just hit 1,024,716,169 downloads and is now officially a part of the three comma club. In the last few years, we’ve seen incredible success with Node.js not just within backend development, but with cross-platform and desktop applications. The technology goes beyond simply an application platform but is used for rapid experimentation with corporate data, application modernization, and IoT solutions.

read more...

Alex Ershov DEV.to

Node.js error handling patterns demystified (with examples)

Error handling in an asynchronous language works in a unique way and presents many challenges, some unexpected. There are seven main error handling patterns in Node.js. Let’s briefly check them all. I’m not sure if this post serves to demystify all of these techniques, but it’s definitely a nice, quick overview of the different patterns.

read more...

David Mark Clements Smashing Magazine

Keeping Node.js fast

David Mark Clements shares tools, techniques, and tips for making high-performance Node.js servers in this super deep post on Smashing Magazine: The surging popularity of Node.js has exposed the need for tooling, techniques and thinking suited to the constraints of server-side JavaScript. When it comes to performance, what works in the browser doesn’t necessarily suit Node.js. So, how do we make sure a Node.js implementation is fast and fit for purpose? Let’s walk through a hands-on example.

read more...

Node.js github.com

An improved debugging experience for Node, enabled by Chrome DevTools

The big question with tools like these is, what can I do with it? Child processes are detected and attached to. You can place breakpoints before the modules are required. You can edit your files within the UI. On Ctrl-S/Cmd-S, DevTools will save the changes to disk. By default, ndb blackboxes all scripts outside current working directory to improve focus. And more.

read more...

Casper Beyer Medium

Is the internet at the mercy of a handful of developers?

In this post from Casper Beyer titled The Node.js Ecosystem Is Chaotic and Insecure, he cites examples like left-pad, is-odd, is-number — and goes on to say the way to be responsible with dependencies is… …don’t trust package managers, every dependency is written by some random developer somewhere in the world and is a potential attack vector. … Is this being too paranoid? Perhaps, or maybe it’s the healthy amount considering the massive reach these trivial packages can have. While this focuses on Node.js, the lessons learned apply anywhere you have dependencies in your code.

read more...

Justin Sisley github.com

mostly – a full stack web app starter kit built on Node.js

mostly’s purpose is to serve as a lightweight, easy-to-comprehend starting point, with a focus on providing a great developer experience while helping you get high quality and maintainable web applications deployed rapidly. It uses Express for the server and React for the client. Worth a look if you’re starting up a new web project. I dig this point about it: Nothing is hidden, nothing is magical, and all of the “plumbing” is accessible and simple.

read more...

Node.js hackernoon.com

A crash course on Serverless with Node.js

If you’ve heard of serverless’ virtues, but have never taken that first step toward trying it out, this crash course is for you. Here’s how you might feel by the end: What a journey. You have now witnessed the transition from traditional web development into the serverless revolution. With these simple tools we now have everything we need to create awesome, scalable, and reliable applications. In my humble opinion, this is all still too much work for most of us to go through. AWS needs some serious competition in this space. Said competition is undoubtedly on the way.

read more...

Steven Loria github.com

Making the Node.js REPL more productive

Project-specific REPLs for Node.js I’m a bit surprised this functionality isn’t in the box, nonetheless: local-repl saves you from typing out imports every time you open a new Node.js REPL. You specify the modules and objects that you want to automatically import in either package.json or .replrc.js. It also lets you use await in the REPL without wrapping your code in async functions. That sounds quite nice.

read more...

Slack github.com

Slack's desktop app bogging you down? Here's a speed-focused alternative.

A cross-platform, open source Slack app that’s built for speed?! Shut up and take my money admiration! Wey is written in Node and the UI is powered by the Yue library, which means it’s not hitchin’ its wagon to Electron. But it does come with a rather large caveat: Do not use this for work, you might miss important messages due to bugs and missing features. Depending on how much you like your job, you might consider that more of a feature than a bug. 😉

read more...
0:00 / 0:00