Below you can find RisingStack’s collection of the most important Node.js updates, projects, tutorials & Node related conferences from this week:
Node.js 8 has a new utility function: util.promisify(). It converts a callback-based function to a Promise-based one.
npm install util.promisify
Learn how to use it.
All the pieces needed to set up a Raspberry Pi with a physical button. Covers buying hardware, running a Raspberry Pi, wiring up a physical button, using the latest Node and npm, and creating a Node server to send a text message when the button is pressed.
This Node.js + MySQL example tutorial shows how you can efficiently handle billions of rows that take up hundreds of gigabytes of storage space.
Most think if anyone has millions/billions of rows, they should use a NoSQL solution such as Cassandra or Mongo. Unfortunately, these solutions are not ACID compliant which makes them difficult to use when data consistency is extremely important.
However, with good indexing and proper planning, MySQL can be just as suitable for the task as the above-mentioned NoSQL alternatives.
Imagine a simple Node application that performs a set of functions. It’s possible you may migrate one or more of those functions into serverless.
Embracing serverless isn’t about destroying every single server you have left, and there are some things that simply don’t make sense in serverless. So I thought I’d build a simple Node app that demonstrated how this could look.
What they are, how they work, and why they are the way they are.
Private class fields are now at Stage 2 in the JavaScript standard process. It’s not finalized yet, but the JavaScript standards committee expects the feature to be developed and eventually included in the standard (although it may still change).
The next major version of NPM brings a number of improvements over the previous versions in terms of speed, security, and a bunch of other nifty things. What stands out from the user’s perspective however is the new lock file. Actually lock files.
As opposed to the previous version, the lock file now includes an integrity field which uses Subresource Integrity to verify that the installed package has not been tempered with or is otherwise invalid.
What the file now doesn’t have is the from field which together with the sometimes inconsistent version has notoriously been a source of pain when looking at the file’s diff during code reviews.
Node 8 is out, did you hear? And it’s faster, or so they say. But without any numbers, ‘faster’ is just letters.
To be honest, with Node 8 I was expecting an improvement of maybe a few percent, and wouldn’t have been surprised if that didn’t translate into the real world. But shaving a quarter off server-rendering time and a third off NPM install time is amazing.
Promise
leads to the creation of a new Promise
, the parent Promise
will be identified as the triggerfs.exists()
function now works correctly with util.promisify()
--inspect=0
zlib.Deflate
and other Zlib classes has been fixed.Decipher
methods setAuthTag()
and setAAD
now return this
.{ttl: true}
for resolve4()
and resolve6()
.Source: The Node Foundation Newsletter
In the previous Node.js Weekly Update we read about Node 8 & npm 5 being released, Mikeal Rogers steps down, a great N-API tutorial, and on-premises Node monitoring announced by RisingStack.
We help you to stay up-to-date with Node.js on a daily basis too. Check out our Node.js news page and its Twitter feed!
Originally published at community.risingstack.com on June 9, 2017.