Jump to content

Setting up Webhost?


ballingerj
 Share

Recommended Posts

Hello everyone,

 

I'm trying to use MAMP to set up a webhost for Phaser, as per http://phaser.io/tutorials/getting-started/part2, and whenever I try to open localhost/hellophaser I get a 403 error. 

 

I've tried setting it up manually too, as per https://discussions.apple.com/docs/DOC-3083, but I can't get that to work either. ^.^' 

 

Can anybody give me a hand? Thanks.

Link to comment
Share on other sites

I think MAMP is overkill for serving a bunch of static files. If you have NodeJS installed you can run "npm install -g http-server" and use that instead by typing "http-server" in the directory you want to serve; much more lightweight.

 

If you have Python installed you can run "python -m SimpleHTTPServer" to start a server in the local directory for the same benefit.

Link to comment
Share on other sites

Oh, I should say: you probably won't be able to access your game directly with a "file:///" URL because of security restrictions around loading files from different directories... at least in Chrome. That's why you need some kind of web server.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...