budo
budo copied to clipboard
Using budo as middleware
I'm looking for a way to attach budō to existing express app (in dev mode). It would be cool if it could be used programmatically as middleware instead of writing custom code that way. Quick look at the source convinced me that it is not something impossible as budō acts allready as middleware composer (correct me if I'm wrong).
The api could be budo.middleware(options)
or budo(options).middleware()
with budo(options).listen(port)
to match express style. This is probably related to #122 and #91
That seems like outside the scope of budo. There's browserify-middleware for that, IIRC.
I think it might be worth pulling the budo core into its own module. In other projects I've needed something like that. 😊 Just a matter of finding time.
Just bumping this issue to say I'd also love to see this feature. Though I'm accustomed to Express I've been looking at using Koa as well.