Upload html5 game in Heroku

1

Stats

1,904 visits, 2,547 views

Translations

This tutorial hasn't been translated.

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

I happend to check heroku for one of our friend to see how difficult is to upload files in Heroku.

After login into account I got the understanding , it is not simple to add static files in heroku and no support HTML files as default, as they use GIT to upload files and make the version of your software/code.

As per official update you have to look at the this link for the understanding:

Static html in Ruby

But it is not easy and simple for everyone and it is technology specific as well.

So I searched little and got the idea, here you have to trick heroku to update static files.

Steps :

I assume you are using windows 7.x,8.x

1) Very first thing install heroku ToolBelt

2) Create folder/directory in your system like C:\heroku or d:\heroku etc....

3) open command prompt (CMD) from start->run

4) go to your newly created directory

      c:\cd heroku

4) Follow below steps :

    heroku login
        login using your heroku user/pass
    git:clone -a mytesthtml5
        Copy here all your exported game files or unzip zip file
    rename index.html to home.html 
    make index.php file and write below code and save file
        <?php include_once('home.html'); ?>
    git add .
    git commit -am "comments here"
    git push heroku master 

And you done, once file uploaded successfully, you can play your game.

Example working game :Working Game link in Heroku

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!