In this article, you will learn how to create a library management system with HarperDB for storage, Ejs for the view, and NodeJs server.
- Create a HarperDB Cloud Instance: Sign up on HarperDB's website, create an account, and set up a cloud instance for your database.
- 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").
- 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.
- Fetch and Display Records: Use the HarperDB driver (harperive) to fetch records from the database and display them on the homepage in a table.
- 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.
- Update and Delete Records: Create modals for editing and deleting records, update the database when editing, and delete records when prompted.