Create an application, register your first route and start an HTTP server.
tsCopy
1import { Lykos } from'lykosjs'23const app = new Lykos()45app.GET('/', async (ctx, reply) => reply.send('Welcome to LykosJS 🐺'))67app.listen(4000, () => console.log('LykosJS running at http://localhost:4000'))
Run your entry file with Bun. Each route handler receives a request context and a response helper. A handler must return a standard Response, either directly or through one of the built-in response methods.
bashCopy
1bun run src/launch.ts
Add a module collection
LykosJS includes a dependency injection system that lets you organize your application into modules. Register your module collection using app.modules() before starting the server.