Open batjko opened 7 years ago
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!
I think it'd be great if the examples used the newer syntax of
`async (ctx, next) => { } with await next()
rather than generator functions.
Agreed
I discovered that there is a pull request that does just that. Sadly, it's been waiting for approval since December. #58
I see that #58 has been merged but no release made. Can I help somehow to move it on?
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 used npx kick-off-koa
for running it, I don't think that's relevant here but just in case)
For 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: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.