calculator

 Js code




const express = require("express");

const app = express();

app.get("/", function(req, res){
  res.sendfile(__dirname + "/index.html")
})

app.listen(3000, function(){
  console.log("server started at port 3000");
});


index.html


<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>calculator</title>
    <h1>calculator</h1>
  </head>
  <body>
    <form action="index.html" method="post">
      <input type="text" name="num1" placeholder="first num">
      <input type="text" name="num2" placeholder="second num">
      <button type="submit" name="submit">calculate</button>

    </form>
  </body>
</html>