pedestal

orestis 2019-07-19T12:25:33.083Z

I had the same experience with docs etc about this — I resorted to looking at the source to figure out the correct interceptors for what I want.

2019-07-19T13:46:54.085900Z

I'm loving the power and flexibility of Pedestal, despite the friction of the incomplete and sometimes inaccurate docs.

2019-07-19T13:47:43.087200Z

in particular, I'm delighted with how I can use all of the interceptor machinery in some code intended to handle actions taken in a turn-based game.

2019-07-19T13:48:13.088Z

@orestis, yeah the docs are a lagging and a constant wip. Please create issues in the https://github.com/pedestal/pedestal-docs repo whenever you encounter incorrect information! It’s greatly appreciated 🙂

2019-07-19T13:48:40.088500Z

using a "router" that matches action keywords to their interceptor chains. that lets me write interceptors that eg. check it's your turn, or that a move is legal before enacting it.

2019-07-19T13:49:45.089100Z

and unlike in most languages, where this kind of thing is a "pattern" I have to reimplement, it's just code I can reuse.

orestis 2019-07-19T14:51:04.090200Z

Oh, I didn’t realize it’s a separate repo. I’ll have a look once I’m back in that area of my app.

2019-07-19T14:53:22.090400Z

np, thanks!

2019-07-19T20:53:36.091300Z

I'm struggling with reloading the server. sometimes it seems to get wedged, and even though I'm doing a reload-all of my top-level server, and then restarting it, I'm getting the old set of routes and interceptors.

2019-07-19T21:01:00.092200Z

@braden.shepherdson you may want to give pedestal.service-tools watch a spin. (https://github.com/pedestal/pedestal/blob/master/service-tools/src/io/pedestal/service_tools/dev.clj#L23-L36)

2019-07-19T21:01:34.092800Z

couple that with run-dev and you should see your route changes take effect