开发者

Node.js HTTP server - how to combine static file server (like Trailer) with a URL router (like clutch)?

开发者 https://www.devze.com 2023-04-06 04:14 出处:网络
I\'m fairly new to Node.js and I\'m starting to love the idea of server-side javascript. I\'m trying to create a web server that on one hand will serve static files with a module such as Trailer and

I'm fairly new to Node.js and I'm starting to love the idea of server-side javascript.

I'm trying to create a web server that on one hand will serve static files with a module such as Trailer and a URL router such as Clutch, and I'm seem to miss the point.

From the modules I see for Node.js there isn't such a simple library, there is Connect and Express, but they are a bit monolithic for me at thi开发者_如何转开发s point, and I'm looking for something that I could define a static file server, and on top of that attach dynamic URL routing.

Any help/links/articles would be greatly appreciated :)


For now it looks that it's not possible to do what I want with Clutch and Trailer, so I'm trying to play with Node-Paperboy that acts as a static file server but also has callbacks that could be used to intercept specific URLs and play with the request object (unlike Trailer).

0

精彩评论

暂无评论...
验证码 换一张
取 消