1

I saw many articles showing how NodeJS can serve static content, like this, basically, they use Node to read the file and return the result. I don't think thats the right way? It seems inefficient? Also how do I detect the right content type (CSS, JS etc)? Is there a proper way of doing this?

4

1 回答 1

4

执行此操作的标准方法是使用已存在的用于静态文件服务的节点模块之一,例如Connectnode-static

于 2012-06-02T14:01:54.680 回答