![]() ![]() Since Electron and the web browser have been told to connect to localhost ( ::1) but the server is actually listening on 127.0.0.1, they do not work.Ī workaround is to put this in your file: module. ![]() On Mac localhost resolves to ::1, not 127.0.0.1. The problem is that webpack-dev-server actually listens on 127.0.0.1 (or maybe 0.0.0.0), but somewhere in its code it says “Oh … 127.0.0.1? Silly users won’t understand that! I’ll replace it with localhost which is much more friendly.”Ī gallant aim perhaps, but not a robust one. You get a blank electron app, and does not load. Note that these tunnels are not necessarily specific to ssh/shell traffic. Then I found the local ip address should not be the 127.0.0. A system that is not connected to any network will have this loopback device and hence a 127.0.0.0 address. I did the same on my mac, and it is not working. They make it easy to redirect a port on the local machine to the IP address and port of a remote machine. This device is present on all systems, regardless of whether they have a physical network device fitted (WiFi or Ethernet, for example). ![]() The “local” URL that the web server prints ( App running at: - Local: should work. Instead, look at the -L and -R options in ssh(1).Run the electron app: npm run electron:serve I would like to be able to do it without extra software such as a DNS. I want it to work offline, so I dont want to rely on something such as. local or whatever and make all the subdomains to be resolved to localhost (127.0.0.1). Create a default project like this: npm install -g create foo # Add Typescript, but it probably doesn't make a difference. I would like to be able to define a local domain such as. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |