Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 921 Bytes

File metadata and controls

29 lines (22 loc) · 921 Bytes

plugin system example with typescript

plugin system for ts and js files
especially for express

about this code:

  this code has plugin.ts file that reads plugins in ./plugin folder and runs the load function of plugins when program starts and runs unload function when program stop. and recognize plugins by name property of every plugin this is exported in every plugin file.

  load and unload function in every plugin can get a parameter of type of App that must be imported from main.ts , the app contains every thing you can do with server or core of the application




note: most this code is based on other code in internet that i don't remember