Fork me on GitHub
#pedestal
<
2017-10-03
>
mtnygard14:10:36

Pedestal 0.5.3 is released

schmudde18:10:59

I’m new to Pedestal and finding this section on http://pedestal.io, Connecting to a Running Application (http://pedestal.io/guides/developing-at-the-repl#_connecting_to_a_running_application), a little empty-ish. Any recommendations on alternative tutorials? I’m not seeing much satisfactory via the Googles.

bherrmann18:10:04

@schmudde I use emacs/cider with pedestal... works great.

schmudde18:10:24

@bherrmann - that’s what I’m doing, and I got through the rest of the tutorial, works great! But, when trying to use it with an existing codebase/running application, I’m having a little trouble. For example, do you ever use response-for?

bherrmann18:10:02

@schmudde no, I've simply used ^C^C to reload the current expression, then I reload in the browser to see effects.

schmudde18:10:04

I’d love to point it at my localhost and get a response.

schmudde18:10:22

So you’re looking at the response in the browser.

schmudde18:10:28

exclusively.

schmudde18:10:33

Sometimes I’d like to get the response, and see the context in my REPL — so I can actually see how the data is structured (I didn’t write these data structures so I need some visibility). Any advice?

bherrmann18:10:53

yes, I ocasionally test an expression from the repl, but typically something small like ... (camelcase-my-string "fluffy")

bherrmann18:10:29

Its old school, put I just toss in a println/ppr on the function / and reload... then copy paste the output where i need it

schmudde18:10:19

What about testing what interceptors give back? You just test within the interceptor’s namespace?

schmudde18:10:49

That’s probably really what I’m asking. Interceptors often require context like user login. I’d love to deliver the context and see what data comes out the other side.

bherrmann18:10:19

I'm pretty much a println wheel... take a look at my "check-auth-interceptor" https://github.com/bherrmann7/podcastmaker/blob/master/src/podcastmaker/service.clj

schmudde18:10:56

Super. Thank you, @bherrmann! All guidance is helpful at this point!

zclj19:10:14

Is there any best practice on the project structure of a pedestal server that will ha a SPA client? Should they be in the same project and share project.clj since the client has no meaningful existence on its own or should they have their own projects for separation of concerns?

mtnygard19:10:14

@zclj I match the team structure. If it’s one team, then I keep front end and back end in the same project. If it’s two teams, then two projects.