I have tried this and this answers but I still cannot access my local host from another computer in the same network using express server.
I am running my express server from a windows 10 machine, I cannot access it when I type in my ip-address. I have tried:
How can I solve this? (A step by step solution would really help, Thanks)
Thanks to this and some other answers(can't get their links).
Follow the steps below:
go to your app.listen part of the code and put the code to look as below:
//For some reason it only works on port 80.
app.listen('80','192.1xx.x.x59', () => {
console.info(`server started on port 80)`);
});
To view it from other computers, you need do http:// or http://myPcsName if that doesnt work.
Finally if it works then after restarting your sever it doesn't, then your computer or network has changed the ip address so you need to do step one again to get your new ip address.
If you understand why For some reason it only works on port 80 and why the ip address changes on server restart please let us know in the comments. Thank you.