Article
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...
Janith Kasun
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
JavaScript's Fetch API allows us to send HTTP requests. It's been a standard part of JavaScript since ECMAScript 2015 (commonly known as ES6) was introduced and uses Promises. This article will first show you how requests were made with vanilla JavaScript before the Fetch API was developed. We will then...
Arpan Abhishek
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...
Heroku is a hosting service that supports Node.js applications. It is easy to use and its functionality can be extended with add-ons. There are add-ons for various things, including messaging/queues, logging, metrics, and of course, data stores. The data store add-ons support popular databases, like PostgreSQL, Redis, and...
Testing is a fundamental part of the software development process. When creating web applications, we make calls to third-party APIs, databases, or other services in our environment. Therefore, our tests must validate those request are sent and responses handled correctly. However, we may not always be able to communicate with...
© 2013-2025 Stack Abuse. All rights reserved.