# Serverino > Serverino is a zero-dependency, multi-process HTTP and WebSocket server library for the D programming language. It uses a daemon/worker process model (epoll on Linux, kqueue on macOS/BSD, select elsewhere) for resilience against crashes and slow-client attacks, and a UDA-based API for routing and configuration. Version 0.8.6: if the project uses a newer one, fetch the latest reference from https://serverino.dev/llms-full.txt. Endpoints are plain functions annotated with `@endpoint`; the server is started by mixing in `ServerinoMain`. Workers are separate processes, not threads: no application state is shared between requests. ```d import serverino; mixin ServerinoMain; @endpoint void hello(Request request, Output output) { output ~= "Hello, Serverino!"; } ``` ## Docs - [Consolidated reference for LLMs](https://serverino.dev/llms-full.txt): Complete API reference, patterns and pitfalls in a single file. Start here. - [serverino.config](https://trikko.github.io/serverino/serverino/config.html): UDAs (`@endpoint`, `@route`, `@priority`, lifecycle hooks) and the `ServerinoConfig` fluent API. - [serverino.interfaces](https://trikko.github.io/serverino/serverino/interfaces.html): `Request`, `Output`, `Cookie`, `WebSocket`, `WebSocketMessage`, `ServerinoProcess`. - [API index](https://trikko.github.io/serverino/): Generated ddox documentation. ## Examples - [All examples](https://github.com/trikko/serverino/tree/master/examples): Compiled in CI, so always in sync with the current API. - [Hello world](https://github.com/trikko/serverino/tree/master/examples/01_hello_world): Minimal server. - [Forms and file uploads](https://github.com/trikko/serverino/tree/master/examples/03_form): `request.post` and `request.form`. - [WebSocket echo](https://github.com/trikko/serverino/tree/master/examples/05_websocket_echo): `@onWebSocketUpgrade` plus a `(Request, WebSocket)` endpoint. - [WebSocket callbacks](https://github.com/trikko/serverino/tree/master/examples/07_websocket_callback): `ws.onTextMessage` and friends. - [Sessions](https://github.com/trikko/serverino/tree/master/examples/09_simple_session): Cookie handling across a multi-process server. - [HTTPS with SNI](https://github.com/trikko/serverino/tree/master/examples/12_https): Plain and encrypted listeners in one process, `request.isSecure`, hot reload of the certificates. Experimental; requires the `https` dub subconfiguration and POSIX. - [Let's Encrypt / ACME](https://github.com/trikko/serverino/tree/master/examples/13_letsencrypt): Serves the http-01 challenge itself, renews with certbot in webroot mode and reloads the certificate without restarting. ## Project - [GitHub repository](https://github.com/trikko/serverino): Source, issues and README. - [Wiki: tips and tricks](https://github.com/trikko/serverino/wiki/): Recipes beyond the API reference. - [dub package](https://code.dlang.org/packages/serverino): `dub add serverino`.