graememcc / micropolisJS

A port of Micropolis to JS/HTML5
Other
647 stars 95 forks source link

Self hosting doesn't work #41

Open RintaDev5792 opened 1 year ago

RintaDev5792 commented 1 year ago

When I host this on my web server, it just says loading and the game does not play

jrincayc commented 12 months ago

Hm, I notice that self hosting index.html is missing the line:

<script type="text/javascript" src="src/micropolis.js?033fad982eaf9f97631d" defer></script>

but adding that is insufficient to fix the problem.

Dhak0s commented 8 months ago

Hm, I notice that self hosting index.html is missing the line:

<script type="text/javascript" src="src/micropolis.js?033fad982eaf9f97631d" defer></script>

but adding that is insufficient to fix the problem.

You have to put everything in your hosted directory into a subdirectory named micropolisJS and add <script type="text/javascript" src="src/micropolis.js?033fad982eaf9f97631d" defer></script> to the index.html after <script defer="" src="thirdparty/jquery/jquery-2.1.1.min.js"></script> at the bottom of the page. That's what worked for me.

marco-acorte commented 2 months ago

You have to deploy on selfhost / localhost the code on "gh-pages" branch

https://github.com/graememcc/micropolisJS/tree/gh-pages