Update to support Koa 3 version
See original GitHub issueFor example, Exercise 1 still tells you to use app = koa()
instead of the class-based notation (app = new Koa()
).
And once you change this, koa tells you that generators are now deprecated and will be removed:
PS D:\koa-test1> node server
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/mas
ter/docs/migration.md server.js:6:5
I don’t know when v3 comes out, but it seems this repo is already out of date for the current version, so it makes sense to go straight to v3.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Koa - next generation web framework for node.js
Koa is a new web framework designed by the team behind Express, ... You can quickly install a supported version of node with...
Read more >koa - npm
Koa web app framework. Latest version: 2.14.1, last published: 6 days ago. Start using koa in your project by running `npm i koa`....
Read more >2.5. Open edX Koa Release — Installing, Configuring, and ...
The recommended approach to upgrading an existing installation of the Open edX Juniper release to the Koa release is to make a fresh...
Read more >3 Kinds of KOAs for Every Way You Want To Camp
KOA Resort campgrounds offer a carefree vacation in the great outdoors with plenty of patio RV sites and Deluxe Cabins with linen service....
Read more >Upgrading Koa to Nutmeg: why don't courses appear?
I'm working on a platform upgrade from Koa to Nutmeg. ... Koa Native has most courses (except 3 which are still at version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was about to log something similar when I saw you already did so… two years ago! I think it’d be great if the examples used the newer syntax of ``async (ctx, next) => { }
with
await next()` rather than generator functions.Not holding my breath, though. Doesn’t look like there’s much activity on this project. Otherwise, it was very helpful for getting up and running with Koa, mind you!
While waiting for this to get published to npm, one could try installing from git as a workaround:
npm install git+https://github.com/koajs/kick-off-koa
(N.B. I installed kick-off-koa in a local directory and usednpx kick-off-koa
for running it, I don’t think that’s relevant here but just in case)