From dce805b0ad384ebd6b9f9df9fd11ee1f96a49ce6 Mon Sep 17 00:00:00 2001 From: Kwyn Alice Meagher Date: Sat, 24 Oct 2015 12:35:08 -0700 Subject: [PATCH] Fix typo in example for Koa instantiation need a capital Koa constant --- docs/api/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index aad0ad7..886b987 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -29,7 +29,7 @@ $ node my-koa-app.js The obligatory hello world application: ```js -const koa = require('koa'); +const Koa = require('koa'); const app = new Koa(); app.use(function *(){ @@ -55,7 +55,7 @@ app.listen(3000); its upstream behaviour. ```js -const koa = require('koa'); +const Koa = require('koa'); const app = new Koa(); // 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`: ```js -const koa = require('koa'); +const Koa = require('koa'); const app = new Koa(); app.listen(3000); ``` @@ -114,7 +114,7 @@ app.listen(3000); ```js const http = require('http'); -const koa = require('koa'); +const Koa = require('koa'); const app = new Koa(); http.createServer(app.callback()).listen(3000); ``` @@ -124,7 +124,7 @@ http.createServer(app.callback()).listen(3000); ```js const http = require('http'); -const koa = require('koa'); +const Koa = require('koa'); const app = new Koa(); http.createServer(app.callback()).listen(3000); http.createServer(app.callback()).listen(3001);