-
Notifications
You must be signed in to change notification settings - Fork 524
Interactive Development
There are two common ways of developing with Ring. The easier way is to use Lein-Ring. The more flexible way is to use the reloaded workflow.
The Lein-Ring plugin is the most straightforward way. To use it, first add it to your project file:
:plugins [[lein-ring "0.8.11"]]
You then need to tell it where your main handler function is. You can do this by adding the following option map to your project file:
:ring {:handler your.app/handler}
Once your project file is set up, you can use the following command to start a development server:
lein ring server
The server will automatically reload any modified files in your source directory.
The reloaded workflow uses components that can be started or stopped, arranged together into a system. During development, the system is started in a running REPL, and when source files change, the system is shut down, the source files reloaded, and the system started once more.