Below you can find a collection of the most important Node.js updates, tutorials & announcements from this week - curated by RisingStack's Node.js Developers.
Node v10.16.0 (LTS) Released
- update ICU to 64.2
- upgrade npm to 6.9.0
- upgrade openssl sources to 1.1.1b
- upgrade to libuv 1.28.0
- events: add once method to use promises with EventEmitter
- n-api: mark thread-safe function as stable
- repl: support top-level for-await-of
- zlib: add brotli support
FunctionScript is intended to provide an easy introduction to API development for those of any skill level, while maintaining professional power and flexibility.
- Clean code: As can be seen from the files example, async/await really makes the code cleaner and easy to read.
- Error handling: We can handle both asynchronous and synchronous errors using try/catch in an async function as can be seen in the files example above.
- Debugging: When debugging then chains, if you place a breakpoint inside a then function and then step over the code, it will not go into the next then function since step overs only work with synchronous code. With async/await it will step over awaits just like it does in synchronous code.
PM2 caused thousands of CI builds to Fail
So pm2 (a node process manager package on npm) just caused thousands of CI builds to fail because of an "optionalDependency" on a package called gkt which is requested as a tarball from a server that was returning 503. That package consists of one file which contains this:
How would you design the data structure for a very large social network like Facebook or Linkedin?
Such kind of question is known to be asked by top-tier tech companies like Google, Amazon, Facebook and Linkedin as part of their recruitment process.
The reason is, that social networks are a great use case for graph data structures. In this tutorial, we will dive into the topic with an hands-on example and build a social network ourselves! Thereby, we will learn how a graph works and why it’s such an important and powerful data structure.
Fullstack CRUD application using Fastify, React, Redux & MongoDB Part-1
In today’s tutorial we’ll be building a Fullstack Application using Fastify, React, Redux and MongoDB, which would support all CRUD functionalities.
The application that we are about to built is a simple menu app that lists all the menu items currently present in the database. In this application you would be able to create menu items, which could hold details like item-name and item-price. You could also modify them or even delete them.
Hooks — A truly modular Node.js App
Task Scheduling with Node.js and Redis
At uSTADIUM, we use a task scheduling system for sending thousands of push-notifications. The need for a task queue and scheduler wasn’t obvious at first. Our server would process notifications as they were needed during a request. Over time, this load began to overwhelm the system.
I wasn’t sure how to fix it so it was an interesting journey solving this problem. In this article, I’ll discuss this method, how we built it using Redis, and our experience as the system scaled.