Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Sign in or join
        JavaScript and TypeScript course

        Hono routes and methods

        Opening JavaScript and TypeScript
        Your turn

        Hono routes and methods

        Routes, methods and responses

        A Hono app maps an HTTP method and a path to a handler. app.get('/status', (c) => c.json({ ready: true })) answers GET on that path, and the context c builds the response. Path parameters such as /plots/:id arrive through c.req.param('id') as text, so 07 and 7 stay different IDs. Hono answers 404, not 405, when a known path gets a method you did not register, and the first matching route wins, so a fixed path such as /files/latest goes before /files/:name.

        What runs in the browser

        The exercises load Hono 4.13.18, the MIT-licensed npm release, and send each request through app.request, the in-process entry point Hono documents for tests. No server or socket opens, and TypeScript checks your handlers in strict mode. To serve the same app from Node, the Hono Node.js guide adds the @hono/node-server adapter. The next lessons cover query values and headers, middleware order, validation with hono/validator and error handling.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        Your account can start a 5-day free trial: every course, unit, project and exam. Card needed; cancel any time and pay nothing.

        New accounts get 6 hours of full access: every course, unit, project and exam. The clock starts when you go past the free lessons.

        Plan your practice from a job ad or syllabus

        Have a referral code?

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.