Custom Login Page

I created a login authentication using okta but so far it’s been using the redirect login page at dev-______.okta.com.

I wanted to use a custom login page so I would have mywebsite.com/login as the url instead, I didn’t use the custom URL feature because i am hosting this locally.

In server.js for my express app I added this to the iodc:
routes: {
login: {
viewHandler: (req, res) => {
const baseUrl = ‘http://localhost:7171
console.log("baseUrl: ", baseUrl);
const fpath = path.join(__dirname + ‘/login.html’);
console.log("rendering: ", fpath);
res.sendFile(fpath);
}
}
}

And this does load up my custom login page but I’m getting a POST error when I try to login. Can someone help me with this

Error message:
POST http://localhost:7171/dev-_______.okta.com/api/v1/authn 404 (Not Found)

Login Page:

You might want to reference the Express sample app from samples-nodejs-express-4/custom-login at master · okta/samples-nodejs-express-4 · GitHub