I am trying to redirect inside of the following method:
app.post('/api/generateAccount/', async (req, res) =>
{
// other stuff here
res.redirect(`/404.html`); //just for testing
});
using the following fetch request:
fetch('/api/generateAccount',
{
method: 'POST',
});
using nodemon I have the following printed: GET /404.html 304 - - 0.487 ms
but unfortunately the web page never changes within the browser, what would be the fix for this?