{"thing":{"id":"c2zSKSF3V_Qr9WFVSHcJ7","createdAt":"2023-09-04T20:35:53.579Z","updatedAt":"2023-09-05T13:16:22.683Z","orgId":"YFEQtuE4NRHjnHT-4WFCu","spaceId":"7hGwhtIHLB1w5HSBvNgZn","parentId":"","threadId":"","reshareId":"","counts":{"likes":0,"replies":0,"reshares":0,"views":1,"tips":0},"visibility":"","opengraph":{"image":[{"type":"","secureURL":"","alt":"","height":0,"width":0,"url":"https://fastify.io/img/logos/fastify-black.svg"}],"title":"Fast and low overhead web framework, for Node.js | Fastify","type":"","url":"https://fastify.io/"},"media":null,"title":"","body":"## Running on Bun with Hono now\n\nA few minutes ago, we deployed our app that is now running on [Bun](https://bun.sh/) using [Hono](https://hono.dev/) framework. We migrated from [Fastify](https://fastify.dev/) running on [Node.js](https://nodejs.org/).\n\nLuckily, it wasn't too hard of a migration. The configuration for Hono is a lot simpler and it cleaned up a lot of things and middleware is a piece of cake. It was mostly little changes like this:\n\n```js\nfastify.get('/', async function (req, reply) {\n   return rend.send(reply, '/views/index.js', {\n       name: \"lucy\",\n   })\n})\n\n// changed to hono style:\napp.get('/', async (c) => {\n    return c.html(await rend.render('/views/index.js', {\n        name: \"lucy\",\n    }))\n})\n```\n\nMigrating to Bun was... well, it just worked. ","tags":[],"data":{},"summaryType":null,"scheduledAt":null}}