yourproject/views/index.ejs
<html>
<head><title></title></head>
<body>
<form action="/" method="POST">
<input name="abc" />
<input type="submit" value="submit"/>
</form>
</body>
</html>
yourproject/routers/index.js
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
router.post("/", async function(Req, res, next)
{
res.send(req.body.abc)
});
module.exports = router;