add hello-world example
This commit is contained in:
parent
9ee6ada2d5
commit
3e56d82184
1 changed files with 9 additions and 0 deletions
9
examples/hello-world.js
Normal file
9
examples/hello-world.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
var koa = require('..');
|
||||||
|
var app = koa();
|
||||||
|
|
||||||
|
app.use(function *(){
|
||||||
|
this.body = 'Hello World';
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000);
|
Loading…
Reference in a new issue