How to run an arbitrary startup function in a ring project?

淺唱寂寞╮ 提交于 2019-11-30 17:41:59

In your project.clj when declaring your Ring handler you can also specify an init (and destroy) function that is run when your application starts:

:ring {:init myproject.core/init
       :destroy myproject.core/destroy
       :handler myproject.core/handler}

This is documented here: https://github.com/weavejester/lein-ring#general-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!