Article
One of the most exciting features coming to JavaScript (and therefore Node.js) is the async/await syntax being introduced in ES7. Although it's basically just syntactic sugar on top of Promises, these two keywords alone should make writing asynchronous code in Node much more bearable. It all but eliminates...
Scott Robinson
When you think of a database the first things that might come in to your head might be MySQL, MongoDB, or PostgreSQL. While these are all great choices for storing data, they're all over-powered for the majority of applications. Consider a desktop chat application written with the Electron framework in...
One of the most common things you'll want to do with just about any programming language is open and read a file. With most languages, this is pretty simple, but for JavaScript veterans it might seem a bit weird. For so many years JavaScript was only available in the browser,...
One of the most fundamental uses of an HTTP server is to serve static files to a user's browser, like CSS, JavaScript, or image files. Beyond normal browser usage, there are thousands of other reasons you'd need to serve a static files, like for downloading music or scientific data. Either...
One of the most common resources you'll interact with in a language like Node.js (primarily a web-focused language) are databases. And with SQL being the most common of all the different types, you'll need a good library to help you interact with it and its many features. Bookshelf.js...
When using NPM to install a module for a project, you may encounter a frustrating error like this: $ npm install express --save npm http GET https://registry.npmjs.org/express npm ERR! Error: failed to fetch from registry: express npm ERR! at /opt/node0610/lib/node_modules/npm/lib/utils/...
If you read one of my earlier posts on how to install Node.js, you probably noticed there are quite a few ways to install it on your computer. This could be from a package manager, from the source code, or from a pre-compiled binary distribution. So, what do you...
Over the past few years, a new type of communication started to emerge on the web and in mobile apps, called websockets. This protocol has been long-awaited and was finally standardized by the IETF in 2011, paving the way for widespread use. This new protocol opens up a much faster...
We all know Node.js is great at handling lots of events asynchronously, but what a lot of people don't know is that all of this is done on a single thread. Node.js actually is not multi-threaded, so all of these requests are just being handled in the event...
© 2013-2024 Stack Abuse. All rights reserved.