How to Load Kernel

In an app deployed under local.esbun.com/apps/APPNAME or esbun.com/apps/APPNAME, load the web OS kernel with 2 steps below.

Add Script Tag

In index.html , add this tag (not that script tag can't be self-closing):

<script type="module" src="/esbun.js"></script>

Load the Kernel

In the controller file of home screen, add wos.init line to load_data method:

async load_data(){
    wos.init();
    // Other things
}

Last updated