I have a dummy node js server with express and I am exposing a dummy Index.html on which I have a simple form like:
<form action="/results" method="post" enctype="multipart/form-data">
<input type="text" name="username" placeholder="Full Name" />
<input type="text" name="email" placeholder="Email" />
<input type="file" name="picture" />
<input type="submit" name="submit"value="picture" />
</form>
When the form is submitted and I'm doing the post:
app.post("/results"), function (req, res, next) { }
instead of doing the classic res.send() :
res.send(`
some html with updated data
`)
I just want to update/inject in Index.html elements dynamically without creating a new html template and add something like Hi <span>${req.body.username}</span> <i>your profile image was updated</i>
Is that possible ?