Project Status
Use case
WebNode is a high-level JavaScript backend plugin system and configuration merger.
Content
Installation
You can install via package manager, simply download the compiled version as zip file here and inject or request via CDN in HTML:
npm install web-node
Example
You can initialize the WebNode plugin system by calling the main function in your entry point script:
// entry-module.ts
import type {PluginHandler as BasePluginHandler} from 'web-node/type'
import main, {isMainModule} from 'web-node'
export const YouWebNodeEntryPlugin: PluginHandler = {
...
}
if (await isMainModule(fileURLToPath(import.meta.url)))
main()
Then simply calling the entry script:
ts-node ./entry-module.ts
When hot module reloading is needed (e.g. in development), you can use web-node as entry point directly. That way your main entry plugin will be hot reloaded as well.
ts-node ./node_modules/web-node/main.js
or
npm run web-node