Run react application

Answered

I use linux, I create a react application from Intellij

When I try to start application I get

 

Compiled successfully!

You can now view premier-projet in the browser.

http://linux-77w7:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

Compiled successfully!

You can now view premier-projet in the browser.

http://linux-77w7:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

 

When I go in a browser,

http://linux-77w7:3000

 

is not working....

 

i tried also localhost, 127.0.0.1 and get the same result.

0
6 comments

is not working....

May you elaborate on that? What error is shown in the browser? 

Is the process actually listening on the port? You can check that via a command like 

# netstat -tpln | grep 3000

 

0

browser said not able to connect to linux-77w7

 

your command return nothing.... netstat -tpln return me

 

Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name 
tcp 0 0 127.0.0.1:62020 0.0.0.0:* LISTEN 17672/AgentConnecti
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp6 0 0 127.0.0.1:6942 :::* LISTEN 27485/java
tcp6 0 0 127.0.0.1:34591 :::* LISTEN 27485/java
tcp6 0 0 127.0.0.1:63342 :::* LISTEN 27485/java
tcp6 0 0 :::1716 :::* LISTEN 17435/kdeconnectd
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 ::1:25 :::* LISTEN -
0

The fact that there is no output for netstat says that the application's daemon is not running. So, there is no application to connect to on the 3000 port. 

Seems that application has not been started, or has been stopped right after start. 

Can you share the project and IDE options (.idea folder in project's root)? 

0

no problem to share... it's only a project generated from idea.....

https://www.pastefile.com/nd87at

0

Working for me: https://i.imgur.com/Y9657ii.jpg

Can you share a short video of reproducing? 

0

finally worked after i add

 

127.0.0.1 linux-77w7

 

in /etc/hosts

0

Please sign in to leave a comment.