Is it feasible to use Snooze with CLOG? #113
Replies: 3 comments 8 replies
-
It should be no issue to use along side clog. (I haven't tried this so let me know if had to make any changes :) clog-connects::app is clog's middleware for clack after initialization. You need to wrap the snooze middleware around that: (setf clog-connection::app (funcall (snooze:make-clack-app) clog-connection::app)) I don't think you can change clack middleware while running so for the moment do the following after initializing your CLOG app: (clack:stop clog-connection::client-handler) Let me know how it goes, if works I'll add something to allow adding middleware's before init of clog. |
Beta Was this translation helpful? Give feedback.
-
BTW all of that was if you wanted run snooze on same port - there is no issue at all if running your REST apis on say http://127.0.0.1:9003 and then CLOG is running on http://127.0.0.1:8080 In a case like that (something I would do to start with) just run your clog app and your snooze app (clack:clackup (snooze:make-clack-app) :port 9003) |
Beta Was this translation helpful? Give feedback.
-
@rabbibotton Hey Dr. Botton, I'm back and trying to make CLOG and snooze work together. I have some questions regarding tutorial 11,
and here is the error I get,
Thank you very much for your time. |
Beta Was this translation helpful? Give feedback.
-
Dear Dr. Botton,
CLOG has given a breath of new life into my web app, however I can't seem to get away entirely from REST/HTTP. I've chanced upon snooze as a URL router library I'd like to use but I can't seem to figure out how -- if it's possible at all -- to integrate it with CLOG. I've naively tried replacing
*app*
with(snooze:make-clack-app)
inclack:clackup
but it doesn't seem to work. I've no intention of asking to include snooze as a CLOG dependency, I think lispers put a premium on flexibility, so would just like to know if it's possible here to use snooze with CLOG. Or am I still too mired in the single duplex way of thinking? Either way, thanks again for CLOG!Godspeed,
Hanshen
Beta Was this translation helpful? Give feedback.
All reactions