October 27, 2020

Node-HarperDB REST API

Welcome to Community Posts
Click below to read the full article.
Summary of What to Expect
Table of Contents
  1. Create a new HarperDB instance named "video-games."
  2. Take note of the instance's "username" and "password."
  3. Set up a schema called "dev" and a table "games" with an "id" field.
  4. Create a .env file with HarperDB connection details.
  5. Install Express and dotenv using npm i express dotenv.
  6. Create a basic Express server listening on the specified port.
  7. Use Postman to test the "GET" route for "Express Server" response.
  8. Install Node-Harper client with npm i harperive.
  9. Establish a client connection in db/client.js using .env details.
  10. Create CRUD controllers in db/index.js.
  11. Implement CRUD methods using the HarperDB client and the callback pattern.
  12. Create an Express router in api/index.js to handle incoming requests.
  13. Test routes in Postman for insert, search, and delete operations.
  14. Browse data in HarperDB to see the results.