Merge pull request #548 from HarleyKwyn/patch-1

Fix typo in example for Koa instantiation
This commit is contained in:
Julian Gruber 2015-10-24 21:37:31 +02:00
commit 0363608eba

View file

@ -29,7 +29,7 @@ $ node my-koa-app.js
The obligatory hello world application: The obligatory hello world application:
```js ```js
const koa = require('koa'); const Koa = require('koa');
const app = new Koa(); const app = new Koa();
app.use(function *(){ app.use(function *(){
@ -55,7 +55,7 @@ app.listen(3000);
its upstream behaviour. its upstream behaviour.
```js ```js
const koa = require('koa'); const Koa = require('koa');
const app = new Koa(); const app = new Koa();
// x-response-time // x-response-time
@ -105,7 +105,7 @@ app.listen(3000);
`Server#listen()`. These arguments are documented on [nodejs.org](http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback). The following is a useless Koa application bound to port `3000`: `Server#listen()`. These arguments are documented on [nodejs.org](http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback). The following is a useless Koa application bound to port `3000`:
```js ```js
const koa = require('koa'); const Koa = require('koa');
const app = new Koa(); const app = new Koa();
app.listen(3000); app.listen(3000);
``` ```
@ -114,7 +114,7 @@ app.listen(3000);
```js ```js
const http = require('http'); const http = require('http');
const koa = require('koa'); const Koa = require('koa');
const app = new Koa(); const app = new Koa();
http.createServer(app.callback()).listen(3000); http.createServer(app.callback()).listen(3000);
``` ```
@ -124,7 +124,7 @@ http.createServer(app.callback()).listen(3000);
```js ```js
const http = require('http'); const http = require('http');
const koa = require('koa'); const Koa = require('koa');
const app = new Koa(); const app = new Koa();
http.createServer(app.callback()).listen(3000); http.createServer(app.callback()).listen(3000);
http.createServer(app.callback()).listen(3001); http.createServer(app.callback()).listen(3001);