koajs / kick-off-koa

[MAINTAINERS WANTED] An intro to koa via a set of self-guided workshops
MIT License
698 stars 93 forks source link

Update to support Koa 3 version #56

Open batjko opened 7 years ago

batjko commented 7 years ago

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:

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.

kenlyon commented 5 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!

batjko commented 5 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.

Agreed

kenlyon commented 5 years ago

I discovered that there is a pull request that does just that. Sadly, it's been waiting for approval since December. #58

CharidimosTzedakis commented 4 years ago

I see that #58 has been merged but no release made. Can I help somehow to move it on?

scorbiclife commented 2 years ago

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)