Menu

Tree [978651] default tip /
 History

Read Only access


File Date Author Commit
 grmod 1 day ago Lee Harr Lee Harr [978651] grdcanv, add experimental caching
 static 1 day ago Lee Harr Lee Harr [978651] grdcanv, add experimental caching
 .hgignore 2026-08-11 Lee Harr Lee Harr [69854f] ignore scripts
 README 2026-08-11 Lee Harr Lee Harr [ede6f8] switch codemirror, jquery, and jquery-terminal ...
 TODO 1 day ago Lee Harr Lee Harr [978651] grdcanv, add experimental caching
 _headers 2026-07-04 Lee Harr Lee Harr [16c169] add for Cloudflare build
 build.examples.py 1 day ago Lee Harr Lee Harr [89f091] maze, fix missed plot conversions
 build.grmod 2026-07-07 Lee Harr Lee Harr [cce5c9] make mod/site build easier
 build.helper.py 2026-08-11 Lee Harr Lee Harr [9581bf] move code stuff from worker_main into worker_code
 build.site 1 day ago Lee Harr Lee Harr [978651] grdcanv, add experimental caching
 devserv.py 2025-11-06 Lee Harr Lee Harr [01641e] make devserv easier to configure
 favicon.ico 2024-06-28 Lee Harr Lee Harr [8920e6] initial
 index.html 2026-08-11 Lee Harr Lee Harr [ede6f8] switch codemirror, jquery, and jquery-terminal ...

Read Me

The easiest way to try CodeJo is the live version on Cloudflare:
    https://codejo.pages.dev/


If you want to download the source and hack or contribute...
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-314.0.2) [static/js/external/pyodide/]
        [Currently set up to run from CDN. Change in worker_main.js ~line 19 to load locally]

    jquery {https://jquery.com/}
        (jquery-3.7.1.min.js) [static/js/external/]
        [Currently served by CDN.]

    jquery-terminal {https://terminal.jcubic.pl/}
        (jquery.terminal.2.46.2.min.js) [static/js/external/jquery/]
        (jquery.terminal.2.46.2.min.css) [static/css/external/jquery/]
        [Currently served by CDN.]

    codemirror-5 {https://codemirror.net/5/}
        (codemirror-5.65.21) [static/js/external/codemirror/codemirror.js]
                             [static/js/external/codemirror/python.js]
                             [static/css/external/codemirror/codemirror.css]
                             [static/css/external/codemirror/darcula.css]
        [Currently served by CDN.]

    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;


If you want to post your own version on Cloudflare, see the build.site script for all files
    that need to be included in the deployment.