How does this new major release affect you? Find out what the breaking changes are and how to use the new features.
The Node.js team has announced the release of a new major version — Node.js 15 🎉!
While a new release is always exciting, some folks are wondering what it means for them.
How do the changes affect me, and what should I do before updating?
What are the new features and their practical use cases?
Aside from a single, but important, breaking change, Node.js 15 is mainly about new features. Updating from older Node.js versions should therefore be fairly straightforward. Keep in mind that Node.js 15 won’t go into LTS, more on that below.
Read on to find out what the new features are and how you can use them in your projects.
Prior to Node.js 15, you would get the following error when a promise would reject without being caught anywhere in the promise chain:
(node:1309) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(node:1309) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
From version 15 and onwards, Node.js will raise an uncaught exception and terminate the application. This can be a nasty surprise in production if you decide to update Node.js without being aware of this change.
By adding a global handler of the unhandledRejection
event, you can catch unhandled rejections and decide how you want to proceed. The following code will simply log the event and keep the application running, similar to the behaviour of earlier Node.js versions:
// Global handler for unhandled promise rejections
process.on('unhandledRejection', (reason, promise) => {
console.log('Unhandled Rejection at:', promise, 'reason:', reason);
// Decide whether to:
// 1\. Do nothing and keep the application running or
// 2\. Exit with `process.exit(1)` and let a process manager automatically restart the application
});
Nowadays, creating a blog is easy. But, with all the different options available, you might go crazy by just doing the research. Your Dev Blog will have a default subdomain `username.devdojo.com`, and you may choose to add a custom domain as well.
A blog lets a person express his/her thoughts, and everyone craves to have his/her blog. Creating a blog is quite simple as of today. Open-source software such as wordpress, jekyll, hugo can help you create & set up your blog. In this post, we will see about Jekyll and how to host it in Github for free.
In this article, I am going to show how you can embed medium blogs on your react app using API. Using the same API you can embed medium blogs on any frontend web applications. In this article, I am going to say how to start from scratch.
Developing a Blogging (Education) Application using Angular 8.
Your blog topic should be something personal to you; you should have experience and/or passion in this area. The more like you doing it, the easier it will be to blog about it.