-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Express Integration #5
Comments
This is a great idea. Express has a large ecosystem around it, so it could fill a lot of the gaps immediately. Perhaps it could be wrapped up as a library. I can see it growing to provide cljs wrappers for the core Express API such as routing and middleware. I'm thinking of using template profiles the way I do in Luminus, so you could have a |
@TerjeNorderhaug, I've added a Macchiato server adapter to use Sente directly: taoensso/sente#307 Example: https://github.com/theasp/sente-nodejs-example/tree/macchiato |
Thanks, mind if I add that under the official examples repo as well? |
Sure, go right ahead, that's what it's for. :) It might be a good idea to note that the example covers other frameworks too, just to avoid confusion. |
Perfect, and I'm thinking I'll factor out the macchiato specific stuff to make it simpler. I guess should probably wait until new sente pr is merged though. |
I hacked Macchiato to work with the Express web framework, combining the two on the same server. It facilitates Express-based servers to be gradually converted to use Macchiato. And existing Express integrations such as Sente can immediately be used with Macchiato. This is the essential code:
Macchiato bidi routes can then be used with Express:
Perhaps it could be an optional module? I'd be glad to turn it into a PR.
The text was updated successfully, but these errors were encountered: