How to use start_server
luozhouyang opened this issue · 3 comments
luozhouyang commented
I found that all examples use a start_dedicated_server
function to start the plugin server. But there is also a start_server
function. If I am not wrong, this start_server
can serve multi plugins with one PluginServer
instance, but how should I use this function? Should I put these code in every python plugin file?
if __name__ == "__main__":
from kong_pdk.cli import start_server
start_server(...)
If so, multi PluginServer
instances will be created, is it right?
fffonion commented
Hi @luozhouyang , start_server
starts a shared server that can be used to manage multiple plugins. In this use case, simply use the kong-python-pluginserver
command and point -d
to the directory containing all your plugin files.
luozhouyang commented
@fffonion Thanks!
luozhouyang commented
I found a example, just for someone need it: