If you are building an application using Node.js, it can get a little overwhelming since there are a variety of databases to choose from and different ways to build APIs. One way to reduce development time and focus on the problem you are trying to solve is to use Database as a service to store the data. The advantage of this approach is to use a cloud database system without purchasing hardware which can be cost and time effective.

One such database service is HarperDB Cloud. To build REST APIs rapidly this service allows us to perform all database operations using a single endpoint. It supports a variety of programming languages such as JavaScript, Java, Python, and so on. Some of the features of HarperDB are the following:

  • single endpoint API
  • allow JSON, CSVs file insertions
  • support SQL queries for full CRUD operations
  • Supports Math.js and GeoJSON
  • limited database configuration required

In this post, let’s build a simple REST API using Node.js and HarperDB Cloud to store some data. We are also going to use Express as the framework to build the Node.js server. It is a minimal and quite unopinionated framework.


Before you begin this tutorial, you’re going to need the following:

  • Node.js version above 12.x.x installed on your local machine
  • Access to a package manager such as npm or yarn
  • Basic JavaScript and ES6 knowledge
  • Access to a REST API client such as Postman or Insomnia
  • Access to a HarperDB Cloud instance (free tier)

To continue with the rest of the tutorial, please make sure you have an account with HarperDB Cloud and are logged in.

#nodejs #technology #database #programming #javascript

How to Build a REST API with Node.js and HarperDB
11.60 GEEK