Google AppEngine dev application server will not start on localhost

I use Eclipse Java EE, and when I compile and run the Google AppEngine project on localhost:8080, the browser does not give any correct output, but when I use 127.0.0.1:8080, my program only runs well in the browser. But when I deploy my application to a Google application, then it localhost:8080will update and work well (only for the instance that I deployed in the application).

Why localhost:8080won't it update correctly and 127.0.0.1:8080change correctly?

I can not use 127.0.0.1:8080insted localhost always, because when I try to get _ah/api/explorer, then it 127.0.0.1:8080/_ah/api/explorerredirects to google apis explorer (not to my api explorer).

What should I do to get it right?

+4
source share
2 answers

Use option:

--address=...

The host address for the server. You may need to install this to be able to access the development server from another computer on your network. Address 0.0.0.0 allows access to the local host and hostname. The default is localhost.

Read more about it here .

+2
source

I would just add this as a comment on the accepted answer, but so far I do not have enough reputation points.

100% , - pom.xml. . "" ... ... http://localhost:8080/ . , 3 .: D

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    {snip}
    <configuration>
        {snip}
        <!-- Comment in the below snippet to bind to all -->
        <!-- IPs instead of just localhost -->
        <address>0.0.0.0</address>
        <port>8080</port>
        {snip}
     </configuration>
 </plugin>

. :

https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-java-maven/blob/master/pom.xml

+2

All Articles