I'm trying to get a submit post from a client page and it sends some information back from the server. I have done it so far by getting the post and then creating a new page with json code while the web server is running. The problem was that I could not update this JSON code or rather the web page while the server is running.
Is there any way I can update or delete the page while running so I can upload the new data?
app.post('/Send', function(req, res){
console.log(req.body.signed);
const x = req.body.signed;
try {
app.get("/test2/", function(req,res) {
res.json({ "variable": x});
});
} catch(err) {console.log(err)}
});
(I'm trying to send some content to the html client that I can always update without using a database, so a post can be sent to another html page that can be constantly updated without reloading the page)