From c62aa90e6effabb95189969eab9df71651243122 Mon Sep 17 00:00:00 2001 From: Saad Quadri Date: Mon, 10 Oct 2016 05:56:14 -0400 Subject: [PATCH] doc: Change usage of reserved word `static` in guide (#829) Very minor, but I think `static` is a reserved word so it might be better to use `serve` instead, I think that's what `koa-static` uses in its examples as well. --- docs/guide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guide.md b/docs/guide.md index a02ccea..2d03fe2 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -256,16 +256,16 @@ $ DEBUG=koa* node --harmony examples/simple ```js var path = require('path'); -var static = require('koa-static'); +var serve = require('koa-static'); -var publicFiles = static(path.join(__dirname, 'public')); -publicFiles._name = 'static /public'; +var publicFiles = serve(path.join(__dirname, 'public')); +publicFiles._name = 'serve /public'; app.use(publicFiles); ``` - Now, instead of just seeing "static" when debugging, you will see: + Now, instead of just seeing "serve" when debugging, you will see: ``` - koa:application use static /public +0ms + koa:application use serve /public +0ms ```