npm run serve: Site cannot be reached from other computers - vue.js

I have installed vue new and I runned vue create .... Then I've tried to reach the site at localhost:8080 (as it was told in the console) directly from my Raspberry Pi I'm working on. Furthermore I've reached the site at the IP-address of my Raspberry Pi, also directly in the web browser on my Pi.
Why can't I reach this site (with the IP-address:port(8080)) from another computers (I've already tried my mobile and my computer)?

Related

Can you use the LAN option to connect your phone to an Expo project when using WSL2?

I have created a new app using expo init <app_name>.
When I lunch it using sudo expo start, the LAN does not work, I get Connection response timed out
My setup is WSL2 + Ubuntu 20.04, and the PC has no WiFi, but my phone is connected to the same home network via WiFi.
I've tried many of the solutions provided by posts here and other forums, including some scripts to forward ports, but none of them worked. The tunnel option does work

Cannot access Vue CLI dev server from other devices in network

I have a Vue CLI project started using npm dev server (npm run serve)
I have this:
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.2:8080/
At local computer I can access the site with browser using both: local and network addresses.
From other devices of local network - cannot (ERR_CONNECTION_TIMED_OUT).
Problem is not in port/firewall: I have tried different ports (e.g. flask server works good (and other devices can access) with one of the ports I tried).
Please help.

Can web component tester and/or selenium run the browser on another machine

I have the following scenario:-
I am developing an SPA using Polymer for the client and a bespoke server using nodejs. It talks to an SQL Server Database on another computer entirely
The production version will run on a raspberry pi INSIDE a Docker container
I am trying to set up a CI system using jenkins on a desktop computer as the master, with a slave node as the raspberry pi. This system will operate in pairs - one pair will work at home (where the desktop is linux) and one pair will operate in an office (where the desktop is windows). A global git repository will allow me transfer between the two, and allow the jenkins machine and its slave to be driven by the same repository (exposed to the raspberry pi via ssh)
I am thinking it unlikely that I can install Docker on the desktop computer in the office
I would like to find a way to test the client aspect of this SPA against the content of the production Docker image. I can produce a test Docker image using the production image as a base in order to include additional test tools such as polymer-cli (which in turn includes web-component-tester and selenium). But that image would have to run on the raspberry pi where there isn't much choice of browser.
I currently run tests on my linux desktop with a nodejs javascript call like const child = spawn('xvfb-run', ['-a', 'wct', '--color'], {cwd: path.resolve(__dirname, 'client')});
What I can't quite get my head around is some portion of web testing is driven by nodejs talking to selenium which then fires up a browser, but where? and then nodejs is serving the content to the browser where it is run (and I am using xvfb-run to capture the output from the browser). Is it possible to have the browser run on another machine (either the windows desktop machine or the place where the global git repository is located)

My computer cannot access website running on it while other computers can

I am building a website with Apache and PHP. I was able to run it on my computer till yesterday.Now, I cannot access it on my own computer with localhost,127.0.0.1 but other computers on my network can access it using my ip. I was trying to install some software yesterday which made Chrome totally dysfunctional and I had to reinstall it. Chrome/IE can access other websites but not my own.
Anybody has any idea about this?

Apache Tomcat not working in every web browser installed in Windows7 32Bit

I'm working on a web application in JSP and my web container is Apache Tomcat 7.0.2 (Its portable cross-platform version). As I've made extensive use of HTML5-CSS3 and my target browser is Google Chrome, I'm able to run the the Apache server only in Opera web browser, neither of the remaining installed browser run it.
Here's the steps I have followed to start the server in my Windows 7 machine.
-Installed the Apache Tomcat service in Windows from apache-tomcat-7.0.2/bin/service.bat
-Started the service with tomcat7w.exe
-As my default port is 8080, I open 'http://localhost:8080/' in various web browsers, and I could see Apache Server Homepage with same address only in Opera Web Browser (11.01), neither of other browsers installed can open it (Chrome 9, Firefox 4 Beta 11 or IE8) and show standard page not found message.
-I also tried other port numbers, but none of them worked.
What can I do to make Apache run in every browser installed in my computer?
I have my computer dual boot with Windows 7 and Ubuntu 10.10, and in Ubuntu, every web browser installed can run Apache once I start it, but same is not working in Windows.
Update:
I have also tried apache's windows-only installer of version 7.0.8 and changed the port number during installation, but still I can't run it on any other browser expect for Opera...
Any help will be appreciated............
Thanks.
Check your hosts file under C:\Windows\system32\drivers\etc\hosts to make sure that the entry for
127.0.0.1 localhost
is intact. Also see that if you are behind a proxy server, the settings allow for localhost to be bypassed.
Congo!! finally got it done, instead of localhost, it works with 127.0.0.1 (which is localhost anyway)
So those who are facing similar issues, as suggested by adarshr, go through your hosts file to see if localhost is correctly addressed to 127.0.0.1, or if you don't want to edit that file, you can still get it done by simply using http://127.0.0.1:8080/ instead of http://localhost:8080/. Please be sure about port number you are using, in my case it was 8080, it might vary depending on how you've configured.