If you come from Node.js, you might find that a lot of things are very similar in Deno, here we show some features that Deno and Node.js have in common, it would be great for learning purpose.
nve differentiates itself from
nvm run because it:
- can be run programmatically
- is 10 times faster
- does not need a separate installation step for each Node version
- works on Windows
- does not require Bash
- is installed as a Node module
Worth noting: this is not a full-on replacement for nvm or any other version manager. It only executes a single command with the specified Node version. But sometimes, that’s all you need. 😄
The fastest wiki and knowledge base for growing teams. Beautiful, feature rich, markdown compatible and open source.
Run Outline yourself for free or pay for the hosted version.
LGTM, but why?
Mostly because I wanted to dig deeper into node web server code, but also because I haven’t jumped onto the NoSQL bandwagon and think that web APIs are extremely useful. The result is a modest attempt at automating the CRUD boilerplate that every developer hates, while following the specs to make API consumption intuitive. I chose sqlite to keep the database side of things simple, with the intent that the API isn’t serving heavy loads.
You’re running out of good reasons to stay on Medium.
Developers, often lacking insights into the intricacies of Docker, may set out to build their Node.js-based docker images by following naive tutorials which lack good security approaches in how an image is built. One of these nuances is the use of proper permissions when building Docker images.
To minimize exposure, opt-in to create a dedicated user and a dedicated group in the Docker image for the application; use the USER directive in the Dockerfile to ensure the container runs the application with the least privileged access possible.
Stop me if you’ve heard this one before…the difference is DeskGap leverages the operating system‘s webview instead of baking a browser in with it (like Electron).
To enable native capabilities while keeping the size down, DeskGap bundles a Node.js runtime and leaves the HTML rendering to the operating system‘s webview.
Attention 📣 Node developers. We’re building highly functional applications, but it’s time to add some pizzazz and breathe new life into our software creations.
I never thought I’d say this, but this is a deep dive on integrating emoji into your Node apps. There’s even a table of contents! 😆
Congrats to all of Mocha’s contributors on what looks like a huge release!
Mint is super cool, but handing over your precious financial information to a 3rd-party is always a bit nerve-racking. Evan You’s new Node app builds a bridge between Plaid (for bank access) and Google Sheets (for data storage) so you can roll your own system.
Now you only have to trust your precious financial information to two 3rd-parties 😉. But! This is open source so at least you don’t have to trust the application code.
hapi was the first (and still the only) framework without any external code dependencies… I personally (and manually) review every single line of code that goes into hapi (excluding node itself). I review every pull request on every dependency regardless if I am the lead maintainer.
That’s quite the selling point! He has a lot of great reasons why hapi is worthy of your consideration. Click through for the hard pitch.
Handling dynamic virtual hosts, load balancing, proxying web sockets and SSL encryption should be easy and robust.
I agree! With built-in support for clustering, HTTP/2, LetsEncrypt, and Docker, this is worth a look. 👀
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.
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.
Hot off the press:
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
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.
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.
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.
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.
David Mark Clements shares tools, techniques, and tips for making high-performance Node.js servers in this super deep post on Smashing Magazine:
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.
Lots of options and features packed in to this little tool. You can even add a watermark to the output, for those of us whose terminal use is Serious Business™.
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.
It took me a long time to find my own path of discovery. My hope is by sharing my story I might save you (and your API consumer) some heartache. Here’s what I’ve learned…
A fun post that culminates in the release of rest-hapi, a REST API generator.