foucdeg / airspaces

An online app to view your X-Plane flight
https://airspaces.app
45 stars 3 forks source link

Error Cannot GET / #15

Closed Orbitally closed 3 years ago

Orbitally commented 3 years ago

Heya, This looks like an amazing app but whenever I try to access it from my browser at localhost:9000 I get an error that says "Cannot GET /" (Screenshot Attached) Any help would be appreciated! I have enabled the settings in X-Plane 11 on lines 20 & 104 with the IP as 127.0.01 and the port as 49003. Thanks, Jacob Screenshot_1

foucdeg commented 3 years ago

Hey Jacob, Maybe this is a copy-paste issue but the IP is 127.0.0.1 (note the dot before the 0). Did you try to use the public online Airspace at public.airspaces.app first ?

foucdeg commented 3 years ago

Actually, port 9000 is the API. This response on / is expected.

If you're running the Docker image, it doesn't serve the frontend client, you need to run it separately (by following the README on Github for the frontend parts) If you're running the app from the instructions on the README on Github, the client should be accessible on port 3000 (not 9000).

Orbitally commented 3 years ago

I'll give that a shot right now! I wasn't running the frontend part so that is probably the issue. I'll keep you updated!

Orbitally commented 3 years ago

Alrighty, so when trying to run the frontend I got this image

foucdeg commented 3 years ago

Oh, you're on Windows. Things should be able to work but you need to slightly edit the package.json file: in the "scripts" section, under "start", change it to "set REACT_APP_ENV=local && react-app-rewired start". This is the Windows syntax for setting inline envirnoment variables which is different from the Linux / Mac syntax.

foucdeg commented 3 years ago

I'm still wondering whether you gave the hosted version at public.airspaces.app a try ? If you don't mind other people seeing where you're flying, it's definitely the easiest way.

Orbitally commented 3 years ago

It works perfectly now! It looks like it was fixed by changing that one line in the package.json. Thanks for the help!