I don't understand how to create a route with Strapi 4

‘use strict’;

const { createCoreRouter } = require(‘@strapi/strapi’).factories;
const defaultRouter = createCoreRouter(‘api::post.post’);

const customRouter = (innerRouter, extraRoutes = ) => {
let routes;
return {
get prefix() {
return innerRouter.prefix;
},
get router() {
if (!routes) routes = innerRouter.routes.concat(extraRoutes);
return routes
},
};
};

const myExtraRoutes = [
{
method: ‘GET’,
path: ‘/posts/:id/comments’,
handler: ‘api::post.post.comments’,
}
]

module.exports = customRouter(defaultRouter, myExtraRoutes);