HarperDB is a scalable SQL and NoSQL database that we can use to store data.
We can make queries including more complex ones like joins.
It’s useful for creating reports and data analysis with the versatility of its API.
It lets us control the database via HTTP requests instead of direct queries.
In this article, we’ll look at how to create a simple web app with HarperDB, Express, and Vue.
We first install the Postman HTTP client.
Then we download the Postman collection from https://examples.harperdb.io/?version=latest.
It lets us look at what features are available and how to issue commands to use them.
Then we install HarperDB by installing Node 12.16.1.
If we use nvm, we can run nvm install 12.16.1
.
Then we switch to that version by running:
nvm use 12.16.1
Next, we install HarperDB by running:
npm install -g harperdb
Then we run it by running:
harperdb run
Next, we create our project with Express and Vue.
It’ll let us read, create, update, and delete data about dogs.
To do that, we create a project folder with the backend
and frontend
folders.
In the backend
folder, we run:
npx express-generator
in the backend
folder.
Then we install the cors
middleware to let our front end use the API and axios
to talk to HarperDB by running:
npm i cors axios
in the same folder.
In the frontend
folder, we run:
npx vue create .
to create the Vue project.
We just go with the default options.
#programming #javascript #web-development #vue #harperdb #express