Question: Hi I am running an AJAX call to a Flask server using Jquery but it is not returning success response message once i run :

```
os.system("roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/maps/"+mapname+".yaml")

```

Here is the request I am making:

```
$.ajax({ 
    url: '/test', 
    type: 'POST', 
    data: new_freq,
    success: function(response){
        console.log(response);
    },
    error: function(error){
        console.log(error);
    }       
})

```

flask server code,

```
    @app.route("/test" , methods=['POST'])
    def test():
        mapname = request.get_data().decode('utf-8')
        os.system("roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/maps/"+mapname+".yaml")

        return(mapname)

```

anybody knows how to return the AJAX success response?

EDIT:i have replaced the command inside `os.system()` with `ifconfig` and `mkdir` it all works and got the success response.This command `roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/maps/mapname.yaml` initiate a node and never run out.So is there a way i could return the success response even the node is running?

Answer: 
What is this IP (`172.18.0.2`) representing? Is it a remote machine where DockStation is running?

If this is a case, check if this port is publicly available on that machine. You did add `ports` section to the Dockerfile which will map container's port to machine's port - but it is a matter whether e.g. firewall blocks outside access to that port.

I would first troubleshoot it by trying to access `localhost:7080` from `172.18.0.2` machine - if it works, your Docker configuration is good and you need to look for the problem in that machine's configuration (e.g. firewall).
This [solution](https://github.com/docker/for-win/issues/3214#issuecomment-533588317) worked for me.

```
docker run -d -p 127.0.0.1:80:80 tutum/hello-world

```

Apparently you have to specify you want the port exposed under localhost. Then `localhost` entered in the browser address bar loaded the Hello World page - hurrah!

Once I changed the ports in docker-compose.yml to `'127.0.0.1:80:80'` then it also worked when run from DockStation.