Article
In this article, we are going to take a look at how to use the Handlebars template engine with Node.js and Express. We'll cover what template engines are and how Handlebars can be used to create Server Side Rendered (SSR) web applications. We will also discuss how to configure...
Janith Kasun
A few years back, callbacks were the only way we could achieve asynchronous code execution in JavaScript. There were few problems with callbacks and the most noticeable one was "Callback hell". With ES6, Promises were introduced as a solution to those problems. And finally, the async/await keywords...
Amazon Web Services (AWS) is a cloud computing provider with a number of extremely popular services. Ever since their launch back in 2006, they've become a key player in the development and deployment of major enterprise applications. Their services are scalable, flexible, and groundbreaking in many aspects, while keeping the...
David Landup
In this article, we will discuss how to integrate PostgreSQL with Node.js. In order to better follow this article, we'd recommend that you have prior experience using Node.js and SQL statements. We will be using simple javascript ES6 syntax in this article. There are a few different clients...
Sequelize is a popular ORM created for Node.js, and in this tutorial we'll be using it to build a CRUD API to manage notes. Interacting with databases is a common task for backend applications. This was typically done via raw SQL queries, which can be difficult to construct, especially...
Tom Kadwill
If you wanted to select elements from an array or object before the ES2015 update to JavaScript, you would have to individually select them or use a loop. The ES2015 specification introduced the destructuring assignment, a quicker way to retrieve array elements or object properties into variables. In this article,...
Guest Contributor
Test "mocks" are objects that replace real objects while simulating their functions. A mock also has expectations about how the functions being tested will be used. In some unit test cases we may want to combine the functionality of spies, to observe a method's behavior under call, and...
Allan Mogusu
In software testing, a "spy" records how a function is used when it is tested. This includes how many times it was called, whether it was called with the correct arguments, and what was returned. While tests are primarily used to validate the output of a function, sometimes...
In this article, we are going to talk about how to use the MongoDB database with Node.js. There are couple of ways to do this, including the a popular approach - using an Object Modeling Library. Mongoose is an example of such a library in Node.js, however, we...
© 2013-2024 Stack Abuse. All rights reserved.