Flask template to host an app that was built with the pygbag module
-
Clone this repository
-
Build your pygame project with pygbag (click here for further command explanation)
python3 -m pygbag --build main.py-
Replace the build-folder with the folder that was built in step 2
-
Run the flask server:
python3 app.py- Add your own routes in app.py for more functionality e.g.:
- Make usage of python libraries that are not compatible with wasm
- Using files like images in the index.html
- Change the SSL keys:
- to your own public and private key
- or change the ssl_context to the string "adhoc" for local testing