How to use koa-route koa for 2.x?

Trying to do this:
const Koa = require('koa'),
 router = require('koa-router')(),
 app = new Koa();

 router.get('/hello', async (ctx, next) => {
 ctx.body = 'it is working!';
});


But there is no reaction. 've tried everything. Not working. Where is the error?
July 2nd 19 at 17:02
1 answer
July 2nd 19 at 17:04
the first example from the official documentation

var app = require('koa')();
var router = require('koa-router')();

router.get('/', function (ctx, next) {...});

app
.use(router.routes())
 .use(router.the allowedmethods element());


+ MB you have the old version of the router
npm install koa-router@next

Find more questions by tags npmNode.js