Skip to content

Web servers

samme edited this page Feb 18, 2022 · 12 revisions

For most Phaser work you need to run a web server on your machine ("locally").

Mac OS or Unix

python  -m http.server 8000 # Unix
python3 -m http.server 8000 # MacOS

ruby -run -ehttpd . -p8000

Node

http-server is a good choice.

Install once:

npm i -g http-server

Run in your project directory:

http-server . -c-1 --open

-c-1 means don't cache and --open means open a browser.

If there's a public folder inside the current directory then http-server will serve from there instead.

Windows

Other

Clone this wiki locally