web-node
v1.0.640
Published
High level javaScript backend plugin system and configuration merger.
Maintainers
Readme
Project Status
Use case
WebNode is a high-level JavaScript backend plugin system and configuration merger.
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-nodeExample
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.tsWhen 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/dist/main.jsor
npm run web-node