Express


How to Build a REST API with Express and Mongoose

This tutorial will guide you to build a RESTful API with Node.js, Express, and Mongoose with CRUD functionalities. I expect that you have the basic knowledge of Node.js and JavaScript. If you do, you’re good to go!

Prerequisites

These software need to be installed on your machine first:

Getting Started

The only thing we need to get started with this project is a blank folder with npm package initialized. So, let’s create one!

Read more


How to Build a Realtime Chat App with Node.js

In this tutorial, we are going to build a basic chat application with Node.js. Before we get started, I assume that you have little bit knowledge of JavaScript and Node.js.

Here, we will be using an awesome tool called Socket.io. If you don’t know what that is, basically it’s a JavaScript library that allows you to handle realtime data on front-end and back-end side. We also going to use Express which is by far the most popular Node.js framework for building web-based applications.

Read more


How to Test Your Express API with SuperTest

Express is the most popular Node.js framework for building web applications, especially REST APIs. And in this article, I’m going to show you how you can test your API endpoints with a cool library called SuperTest.

SuperTest is an HTTP assertions library that allows you to test your Node.js HTTP servers. It is built on top of SuperAgent library, wich is an HTTP client for Node.js.

Getting Started

The best way to learn how to write tests is by testing an existing app. So, in this tutorial we’re going to use the blog REST API I built using Express and Mongoose which you can read more in this article. You can clone the repo onto your computer using the command below.

Read more