/************ # Notes ## Prepare Files - basedir_called_whatever - front - index.js - (optional: node_modules, package.json, ...) - back - http_server_with_js_build.js - (optional: node_modules, package.json, ...) ## Launch - "bun run" this file (e.g. "bun run ./basedir_called_whatever/back/http_server_with_js_build.js") ## Env Vars - CTX_WEBSERVER_PAGETITLE - CTX_WEBSERVER_HOST - CTX_WEBSERVER_PORT ************/ const async_build_js_script = async (path_js_entry_script, build_options) => { const result = await Bun.build({ entrypoints: [ path_js_entry_script ], ...build_options, }) const str_out = await result.outputs[0].text() return str_out } const PAGE_TITLE = Bun.env['CTX_WEBSERVER_PAGETITLE'] || 'MyCoolWebapp' const get_siteroot_html = function () {return `