June 7, 2021

How to Build a Library Management System with Harperdb, Ejs and Nodejs

Welcome to Community Posts
Click below to read the full article.
Summary of What to Expect
Table of Contents

In this article, you will learn how to create a library management system with HarperDB for storage, Ejs for the view, and NodeJs server.

  1. Create a HarperDB Cloud Instance: Sign up on HarperDB's website, create an account, and set up a cloud instance for your database.
  2. Create Database Schema and Table: Within the cloud instance, create a schema (e.g., "book") and a table (e.g., "record") with a unique identifier (e.g., "record_id").
  3. Set Up the Application: Clone the Library Management System repository from GitHub, install dependencies with "npm install," and configure the .env file with instance details.
  4. Build User Interface: Use HTML, CSS, and JavaScript, along with EJS templates for dynamic content, to create the application's user interface.
  5. Fetch and Display Records: Use the HarperDB driver (harperive) to fetch records from the database and display them on the homepage in a table.
  6. Add New Records: Implement a form for adding book details, use the POST method to send data to the server, and insert the new record into the HarperDB database.
  7. Update and Delete Records: Create modals for editing and deleting records, update the database when editing, and delete records when prompted.