代码拉取完成,页面将自动刷新
{
"name": "dufing",
"version": "1.0.14",
"description": "The folder based webserver for node",
"main": "index.js",
"directories": {
"example": "example"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zmofei/dufing.git"
},
"keywords": [
"webserver",
"node.js"
],
"author": {
"name": "Mofei Zhu",
"email": "13761509829@163.com"
},
"license": "ISC",
"bugs": {
"url": "https://github.com/zmofei/dufing/issues"
},
"homepage": "https://github.com/zmofei/dufing#readme",
"dependencies": {
"handlebars-layouts": "^3.1.4",
"hbs": "^4.0.1",
"jade": "^1.11.0"
},
"readme": "# Dufing - A folder system based Node.js webserver\n\n--------------------------------------------------------------------------------\n\nDufing 是一个基于文件系统的Node.js webserver, 他可以自动根据文件结构读取router文件,同时支持第三方middleware。\n\n## 安装\n\n```\nnpm install --save dufing\n```\n\n## 快速上手\n\n#### 1. app.js\n\n```JavaScript\n/**\n * app.js\n * 使用dufing只需简单的require,然后实例化即可\n */\n\n'use strict';\n\nlet Dufing = require('dufing');\n\nlet site = new Dufing({\n // 指定端口 默认端口是8124\n port: 8333\n});\n```\n\n#### 2. root/index.js\n\n```JavaScript\n/**\n * root/index.js\n * 默认情况下 root 为代码的根目录\n * 访问 127.0.0.1:8333/ 系统会自动的查找 `root/index.js`\n * 具体的路由规则,详见路由模块的介绍\n */\n\nvar render = function() {\n // this.req 相当于请求的request\n // this.res 相当于请求的response\n this.res.writeHead(200, {\n 'Content-Type': 'text/plain'\n });\n this.res.end('welcome to dufing');\n}\n\n// module.exports 将需要执行的代码块抛给dufing处理\nmodule.exports = render;\n```\n\n#### 3. static/\\*.\\*\n\n默认情况下,static为静态资源目录,所有符合规则的静态资源都会被直接读取到。\n\n比如访问\n\n`http://hostname/test.js` 系统会尝试访问 `static/test.js` 如果不存在返回404\n\n## 示例\n[朱文龙的自留地](http://www.zhuwenlong.com) ([代码](https://github.com/zmofei/myblog))\n",
"readmeFilename": "README.md",
"gitHead": "74148369bafe4292ce298142f636ec56ea9d1843",
"_id": "dufing@1.0.7",
"_shasum": "18d2cc347dfc6ac6904195af42e48305fbc0b602",
"_from": "dufing@>=1.0.1 <2.0.0"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。