Hello Everyone
In this post, we will learn about how to create your own server and link your local HTML page with it. In this tutorial, We are going to use Express.js. So without wasting time let's begin the tutorial.
Open the VS code( Visual Studio Code) and open a black folder where you want to store your files.
Open the terminal. First, we need to install Express.js. Make sure you have already installed the node.js in your PC.
To install the express.js type npm install express.js --save in the terminal.
index.jsconst express=require("express");
const app =express();
app.get("/",function(re,res){
res.send("welcome to the page. This is a post on Hive blockchain")
})
app.listen(8000,function(req,res){
console.log("server is running");
});
server is runninghttp://localhost:8000/<h1>This much is enough for today. We will explore the express.js more in the upcoming posts. If you like the post please do upvote and comment