content types 处理多种内容类型
内容类型处理多种内容类型例子var http = create("http") , contentTypes = require("content-types") http.createServer(function () { contentTypes(req, { "text/html": returnHtml , "application/javascript": returnJson })(req, res) }).listen(8080) function returnHtml(req, res) { res.end("
- foo
- bar
下载地址
用户评论