How to set Heroku Port for NodeJS Express App?

so I’m trying to host my website on Heroku and set up everything to get my app up and running. Whenever I try to submit the form I get undefined errors. Undefined Errors Console Errors I’ve set it up to use the port like shown in the documenation: When starting the app locally with heroku local web I get Typerror: Failed to Fetch and the undefined results but when I go into my .env file and add a port=8081 it works perfectly fine. Good result When I open it with heroku open I still have that undefined problem. I don’t