These files are not saved in the repo and are needed to run:
library-name {library home page}
(version tested/built with) [install/unpack in]
pyodide {https://pyodide.org/en/stable/}
(pyodide-core-0.28.3) [static/js/external/pyodide/]
[Can also run directly from CDN. Change in worker_main.js ~line 19]
jquery {https://jquery.com/}
(jquery-3.7.1.min.js) [static/js/external/]
jquery-terminal {https://terminal.jcubic.pl/}
(jquery.terminal.2.45.2.min.js) [static/js/external/]
(jquery.terminal.2.45.2.min.css) [static/css/external/]
codemirror-6 {https://codemirror.net/}
(https://github.com/RPGillespie6/codemirror-quickstart) [static/js/external/cm6.bundle.js]
(codemirror.css) [static/css/external/]
fabric.js {http://fabricjs.com/}
(fabric-6.4.3) [Runs directly from CDN]
Local Server
The pages must be accessed through a web server. A simple server is included,
but should not be used to serve files on the Internet.
To start the local development server:
$ ./devserv.py
OR
$ python3 devserv.py
Then browse to:
http://localhost:8888/
The site must be served with proper headers to allow the javascript sharedBuffer to work.
It also must be served over https unless you are serving only localhost (127.0.0.1)
(Settings tested with nginx-1.22.1 and with Local Server [above] using Python-3.11.2)
add_header Access-Control-Allow-Origin "localhost"; # or your site base url
add_header Cross-Origin-Embedder-Policy "require-corp";
add_header Cross-Origin-Opener-Policy "same-origin";
(Also on nginx-1.22.1)
Need to set up serving .mjs files as application/javascript
I've used two methods, both times, but I believe only one is needed.
(be sure after making changes to mime/type configuration that you clear your browser cache! -- as well as restart the http server)
1) Add mjs to the application/javascript line in mime.types
2) Add a types section directly to nginx.conf
types {
application/javascript js mjs;
}
Then restart server AND clear your browser cache!
Also may need to add serving wasm files as application/wasm
This was on an older version of nginx (1.10.3) so this line may already be there in newer versions
I added the line directly to mime.types:
application/wasm wasm;