// TODO - change the server to instead "replace" node values like how 'import with' works. The notebook can define the imports as named cells with a null / mock value, allowing them to be executed and tested in the browser. And the "real" nodejs application can resolve the value of those cells using the actual imports / inputs.
main = use_express(async context => {
const { app, puppeteer } = context;
const browser = await puppeteer.launch({ args: chrome_args });
const notebooks = new Map();
redirectHttpToHttps(context);
middleware(context);
favicon(context);
app.get('/notebook.stats', serveNotebookStats({ notebooks }));
app.all(route, serveNotebooks({ browser, notebooks, ...context }));
})