We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 034dfc6 commit fde16d1Copy full SHA for fde16d1
README.md
@@ -1,2 +1,32 @@
1
-# node-tiny-http
2
-A tiny node.js http framework
+# 一个简单的可扩展的node.js web框架
+
3
+## 为什么要开发这个框架?
4
5
+目前node.js上的http框架已经很多,大名鼎鼎的`express`和`koa`都有大量的用户。但是我在使用后发现在很多项目中,它们在某些方面显得过于繁琐,而有些需要重度使用的地方又处理得太过简陋。因此我们结合自己的项目经验开发了这款web框架。目的是打造一款便于使用的,API友好的,可以高度自定义的框架。
6
7
+## 安装
8
9
+我们会及时发布到npm上,你只需要在项目中
10
11
+```
12
+npm install node-tiny-http
13
14
15
+## 使用
16
17
+### Hello World
18
19
+通常我们用一个最简单的例子来展示框架的基本运行情况
20
21
+```javascript
22
+var http = require('node-tiny-http');
23
24
+http.get('/', function (done) {
25
+ return done('content', 'Hello World!');
26
+});
27
28
+http.start({ host : 'localhost', port : 9999 });
29
30
31
+打开浏览器并访问<http://localhost:9999/>即可看到效果。
32
0 commit comments