-
Notifications
You must be signed in to change notification settings - Fork 4
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").
python -m http.server 8000 # Unix
python3 -m http.server 8000 # MacOS
ruby -run -ehttpd . -p8000
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.