From 377599862710c4b8b4a73efb525f1071277ca5ec Mon Sep 17 00:00:00 2001 From: snowdream Date: Wed, 9 Jan 2019 14:39:11 +0000 Subject: [PATCH] Update 'README.md' fix #1 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6adddf..a5ee4bc 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ var greenlock = require('greenlock-koa').create({ var http = require('http'); var https = require('https'); var koa = require('koa'); -var app = koa(); +var app = new koa(); app.use(function *() { this.body = 'Hello World'; @@ -84,7 +84,7 @@ server.listen(443, function () { // http redirect to https var http = require('http'); -var redirectHttps = koa().use(require('koa-sslify')()).callback(); +var redirectHttps = app.use(require('koa-sslify')()).callback(); http.createServer(greenlock.middleware(redirectHttps)).listen(80, function () { console.log('Listening on port 80 to handle ACME http-01 challenge and redirect to https'); });