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

Hi nitin_tejuja ! I returned Comment ${id}, but I have same result.

Did you mean returning something like this ?

'use strict';

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::post.post', ({strapi}) => ({
    comments: async (ctx) => {
        const id = ctx.params['id']
        return `Comment ${id}`
    }
}));