Fork me on GitHub
#boot
<
2016-10-14
>
ag20:10:24

hey guys how do I restart jetty server running by pandeiro.boot-http? from repl

ag20:10:33

without having to restart repl

ag20:10:55

this (boot (serve “--reload”)) yapping about address being in use

pandeiro20:10:43

@ag You'd need to stop the existing server first, or bind to another port

ag20:10:45

ok… how do I stop that sucker?

pandeiro20:10:16

I don't think you have an easily accessible reference to the server object unfortunately

pandeiro20:10:27

So kill the REPL process

ag20:10:38

😞 that sucks

pandeiro20:10:44

Ideally you should not need to restart the server

pandeiro20:10:50

What's the use case?

ag20:10:09

so I change code in ring handler I need to restart repl every time?

pandeiro20:10:38

No, there's an option to load ring reload middleware so that such changes would be picked up automatically

ag20:10:10

oh… teach me that sorcery please!

pandeiro20:10:15

If you're looking for a REPL focused workflow though, it might be easier to manage the server creation yourself

pandeiro20:10:26

It's in the README

ag20:10:58

in what readme? boot-http?

ag21:10:36

I tried running it like this in my task (serve “—reload”). That I think didn’t help

dave21:10:36

@ag when running it from a REPL like that, the syntax is (boot (serve :reload true))