I made a game with the Phaser game framework on a course, and now I want to add features and build upon that game. The only problem is that I built the game with the course on webpack, which served the game on localhost:8080 I want to now stop using localhost and put the game on a normal website, but for that, I need to get it off localhost. I think the problem is in the index.html file where I render the game. Here is the index.html code:

  body {
    padding: 200px;
 <script type="text/javascript
<script type="text/javascript" src="src/index.js"></script>

Please tell me how I can put my game on a normal website. Thank You!

  • \$\begingroup\$ What are the symptoms of the problem you observe? Do you get any error messages in the console? \$\endgroup\$ – DMGregory Jan 21 at 16:16
  • \$\begingroup\$ I will check the console \$\endgroup\$ – GreatCoder Jan 21 at 16:19
  • \$\begingroup\$ There was a module import error that I fixed, but now there is an error saying that the resource was not found, although in my code editor when I follow the links everything is fine. \$\endgroup\$ – GreatCoder Jan 21 at 17:58
  • \$\begingroup\$ What specific resource was not found? Edit your question to include the full text of the errors you see. \$\endgroup\$ – DMGregory Jan 21 at 17:59
  • \$\begingroup\$ Actually, I think that the error that happens after the module error is because of the CORS policy, so I am going to install an HTTP server and get the game working from there. Then, when I put it on a website hosting service, there will be no problem. \$\endgroup\$ – GreatCoder Jan 21 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.