okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
0b3299a01
main
1/** 2* Host bootstrap. 3* 4* `utilityProcess.fork` starts a plain Node service process from inside the app bundle. This tiny 5* CommonJS shim exists because the App Host itself is an ES module (`server/index.mjs`) and the 6* utility-process loader has been observed not to start an `.mjs` entry point from inside a 7* packaged bundle. Loading it dynamically from an ordinary CommonJS entry removes that variable 8* while keeping the host's own module graph unchanged. 9* 10* It intentionally does nothing else: no supervision, no lifecycle, no policy. All of that belongs 11* to the host and to Strata Control. 12*/ 13'use strict' ; 14 15const { pathToFileURL} = require ( 'node:url' ); 16const { join} = require ( 'node:path' ); 17 18const entry = join ( __dirname , 'index.mjs' ); 19 20import ( pathToFileURL ( entry ). href ). catch (( err ) => { 21process . stderr . write ( `[strata] the App Host failed to load from ${ entry } : ${ err && err . stack ? err . stack : err } \n` ); 22process . exitCode = 1 ; 23});