This MR brings back in a way better state the old coincident/server after the following refactory:
both main and server share the exact same code, which has been battle-tested for being reliable in terms of GC operations and robust in terms of functionality
both main and server now allow directenv.import(module) execution (must be awaited) so it's possible to import in a worker modules that are available on the client side only or available on the server side only
the server export differentiates like the window one with coincident/server/main, for the HTML side of affairs, coincident/server/worker for the Worker side of affairs, and just coincident/server for NodeJS or Bun (or others) server side JS engines
the DEBUG flag is allowed in all worlds by simply using DEBUG=1 npm run build and, together with NO_MIN=1 flag, allows great introspection of the code in every possible environment (main, worker, or server).
To test the server simply run npm run server:node and visit the logged page which should produce the following output (accordingly with your machine):
This MR brings back in a way better state the old
coincident/server
after the following refactory:env.import(module)
execution (must be awaited) so it's possible to import in a worker modules that are available on the client side only or available on the server side onlyserver
export differentiates like thewindow
one withcoincident/server/main
, for the HTML side of affairs,coincident/server/worker
for the Worker side of affairs, and justcoincident/server
for NodeJS or Bun (or others) server side JS enginesDEBUG
flag is allowed in all worlds by simply usingDEBUG=1 npm run build
and, together withNO_MIN=1
flag, allows great introspection of the code in every possible environment (main, worker, or server).To test the server simply run
npm run server:node
and visit the logged page which should produce the following output (accordingly with your machine):