0

I have a form and I want it to use post request in it what I wanna do is ask for a username and password in the form and send the details back to the server from there check for credentials and send the static page if its correct

but whenever I use res.sendFile in a post request it always says cannot post Pls help

I am trying to do it something like this

app.post('/main', (req, res) => {

res.sendFile(__dirname + "/public/somepage.html")}

0 Answers0