mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.17k stars 106 forks source link

Using budo as middleware #158

Open kolya-ay opened 8 years ago

kolya-ay commented 8 years ago

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

mightyiam commented 8 years ago

That seems like outside the scope of budo. There's browserify-middleware for that, IIRC.

mattdesl commented 8 years ago

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.

spacejack commented 6 years ago

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.