From 57f260c1bb3ebd9be8026205b438bacc4a7624ae Mon Sep 17 00:00:00 2001 From: nicco Date: Fri, 18 Aug 2017 18:46:22 +0200 Subject: [PATCH] Update Readme --- README.md | 16 ++++++++-------- package.json | 5 +---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 59ce040..618b05f 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,20 @@ Koa Cookie Utility ```javascript const Koa = require('koa'), - router = require('koa-simple-router'), + router = require('koa-simple-router'), cookie = require('cca-koa-cookie') -const +const app = new Koa(), port = 3000 - -// Parse Parameters -app.use(require(cookie)) + +// Parse Parameters +app.use(cookie) app.use(router({}, _ => { _.get('/set', (c, n) => { - - // Set a cookie + + // Set a cookie c.request.cookie.set({ key: 'my_id', value: '12345678', @@ -27,7 +27,7 @@ app.use(router({}, _ => { httpOnly: true, secure: false }) - + c.body = [200, 'Cookie Set'] }) diff --git a/package.json b/package.json index 35c0ca8..67ccb6f 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,6 @@ "version": "0.1.0", "description": "Cookie Parser and Setter for Koa", "main": "Cookie.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", "url": "git+https://github.com/CupCakeArmy/koa-cookie.git" @@ -21,4 +18,4 @@ "url": "https://github.com/CupCakeArmy/koa-cookie/issues" }, "homepage": "https://github.com/CupCakeArmy/koa-cookie#readme" -} +} \ No newline at end of file