I need to run my local React app at
banker-dev.mh*b.myon port number 443.This is to enable the app to call a third party API
I've set my local .env file with the following:
HTTPS=trueHOST=banker-dev.mh*b.myPORT=443When I run
npm start, I encountered the message:
? Admin permissions are required to run a server on a port below 1024.
Would you like to run the app on another port instead? (Y/n)
So I tried
sudo npm startbut hit errorsudo: npm: command not foundI then sudo installed npm by referring to this: sudo: npm: command not found
Now I'm able to run
sudo npm startThe app is started as I can see from the code editor.
But it's not opening a new browser window with the app loading as it usually does with my normal
npm startAnd I noticed a weird thing: it's trying to bind to the host
dev.mh*b.myinstead ofbanker-dev.mh*b.my
My hosts file contains the following:
127.0.0.1 localhost127.0.1.1 yogesnsamy-ThinkPad-E490s127.0.0.1 banker-dev.mh*b.my127.0.0.1 dev.mh*b.myI'm doing something wrong, but I'm not sure what. I'm attaching a video reference of what's happening: https://drive.google.com/file/d/1TYcX3wG8yBFjSukvVAkYZDloPJE3JS8T/view?usp=sharing Sorry that part where the app starts to load takes long (0:34 to 1:00). After it does, I try to view the app on the browser but fail.