trevor-laher / OnDemandMinecraft

An AWS hosted Minecraft server that will only run when players are active. Players can start the server through a simple UI accessed through free Heroku server hosting.
MIT License
517 stars 68 forks source link

Adding the last known IP in the default template #11

Closed ainskeep closed 5 years ago

ainskeep commented 5 years ago

this will help if someone closes the dialog pop up box to find the IP address.

trevor-laher commented 5 years ago

A couple things. First, with this code, wouldn't it be possible for someone to view the IP despite not entering the password? If someone started the server and the Heroku server was still running, a user could go to the page again and the IP would appear. I think we should instead go the route of updating the IP on the page as soon as the user enters the password, assuming my first point is correct.

trevor-laher commented 5 years ago

I've actually gone ahead and implemented it myself, but instead of searching for last known IP, it pulls from the AWS running instances after a user enters the password. The page then updates with the displayed IP address instead of using the javascript/alert solution.