https://developer.playcanvas.com/en/user-manual/publishing/web/self-hosting/
if you scroll down to the bottom of this page, it has 3 easy ways to self host.
Running a Downloaded Build
You cannot load your application by opening the index.html
file in a browser or from a file://
url. You must use a local webserver to load the index.html
file using http://
or https://
.
There are many options for running a web server. Here are a few:
- Easy: Install Python and run the command python -m SimpleHTTPServer from the same folder as your application’s index.html. Then point your browser to http://localhost:8000
- Intermediate: Install XAMPP. Although this is a full PHP development environment, it includes an easy to configure Apache server.
- Advanced: Install Apache or nginx as a standalone service.
the problem is, is that the first one (easy) doesnt work anymore. installing python would most likely install python 3 or higher, and since python 3, python -m SimpleHTTPServer, doesnt work anymore. instead, you have to use python -m http.server and then conect to localhost:8000. just soemthing to look out for