Skip to content

MrMiM-tfe/plugin-system-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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