3
我在生產環境中的應用程序中嵌入了YAWS,我使用函數yaws:start_embedded/4
來啓動YAWS。是否可以在運行時添加YAWS appmods配置?
下面是我的代碼:
Id = "my_server",
GconfList = [{logdir, "./log"}, {id, Id}],
SconfList = [{docroot, Docroot},
{port, Port},
{listen, Listen},
{appmods, [
{"/rest", mod_rest, []},
{"/file", mod_file, []}
]}
],
yaws:start_embedded(Docroot, SconfList, GconfList, Id).
我想補充另一個appmod,e.g:{"/upload", mod_upload, []}
是否有可能添加在運行時appmods無需重新啓動YAWS?
我試過你提供的代碼,它工作,並不會影響其他連接的連接,非常感謝你! – chengweichao