[Web dev] How to run on localhost ?

TomLaPommeTomLaPomme Posts: 19Member

Hi people !

I'm trying to make a browser game with Godot for the first time and when I use the 'run in browser' button it use the Files:// url but I want it to use my localhost:// url because the game won't work outside a web server. How can I change it ?


Tags :

Best Answer

  • KioriKiori Posts: 246
    edited June 2017 Accepted Answer

    Well, i personally havent tested the html5 engine on Godot recently. But normally you export the files, move the files into your local server's base folder, activate the software you are using for the server( e.g. XAMPP), and then just run the file and it should work.

    I always test any html from an outside software that specializes in it, like XAMPP(under windows).

    Hope that it helps, good luck!

    Edit: btw, in case the above isnt clear, in my xampp install, if i move a folder named "godotexport" (which has the files) to xampp's base folder, i open the browser and go to "localhost/godotexport" and it should 'just work'.

Answers

  • KioriKiori Posts: 246Member
    edited June 2017 Accepted Answer

    Well, i personally havent tested the html5 engine on Godot recently. But normally you export the files, move the files into your local server's base folder, activate the software you are using for the server( e.g. XAMPP), and then just run the file and it should work.

    I always test any html from an outside software that specializes in it, like XAMPP(under windows).

    Hope that it helps, good luck!

    Edit: btw, in case the above isnt clear, in my xampp install, if i move a folder named "godotexport" (which has the files) to xampp's base folder, i open the browser and go to "localhost/godotexport" and it should 'just work'.

  • TomLaPommeTomLaPomme Posts: 19Member

    So I have to export my files all the time I need to test it in a browser ?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file