Skip to content


Runtimes > Bun - itty-router

For standalone, stateful servers, we highly recommend Bun as an alternative to Node. Given that Bun's server uses Web Standards, it works automatically with itty.

Leverage the pass-through nature of itty-router options to control the port (or anything else).

import { AutoRouter } from 'itty-router'

const router = AutoRouter({ port: 3001 })

router.get('/', () => 'Success!')

export default router