Pedestal development using emacs.
Pedestal is my current favourite backend development library for Clojure. I find it a lot cleaner than Ring for various reasons that I’m going to get into in a future blog post.
This is how I do pedastal development: I start my dev eniornment, usually IntelliJ+Cursive or Emacs+Cider; because VSCode doesn’t have any good plugins yet.
Then I run (def serv (run-dev)) in the repl and you have a running dev server. Then the repl should pick up on file changes, but it does not work that well with all editors. Or that is at least my personal experience. Seems like some editors don’t send the proper notifications or something.
Anyways, when I launch the repl in iTerm and edit with VS Code updates are detected without me doing anything. But, if you use emacs or Cursive you need to tell the editor to evaluate the file you are editing before you see the changes. In Cusrive it is CMD SHift H, and it is M-x cider-load-buffer and the changes should show up more or less immediatly.
If you want the full story, you have to run cider-jack-in to start the repl, and then cider-switch-to-repl-buffer to get the buffer and then I run (def serv (run-dev)), and cider-load-buffer each time something changes (full: cider-jack-in, cider-switch-to-repl-buffer, cider-load-buffer)