The README shows how to add Flak to a build and write a first app. These pages cover each feature in detail.
Building an app
- Apps and servers: creating apps, port and address, hosting several apps on one server, HTTPS, threads
- Routing:
@Route, HTTP methods, path variables, splats, matching rules, listing the routes of an app - Handler arguments: path variables, query parameters, objects built from the query string or a form, forms, the request, custom arguments
- Responses: return types, formatters, status and headers, redirects, streaming
- Request bodies: streaming uploads, size limits
- Errors and hooks: error statuses, error and success handlers, request listeners, unknown URLs, hooks that run before every request
- Compression: gzip
- Static resources: serving files from a directory or the classpath
- Server-Sent Events: pushing events to pages, with
EventSource - CORS: letting pages of other origins call the app
- CSRF: refusing the requests that other sites make browsers send
- Monitoring: request listeners, and the JFR event that lets profilers tell which route each sample belongs to
Add-ons
- Plugins: how add-ons are installed, and how to write one
- JSON:
flak-jackson - Authentication:
flak-login, sessions and permissions - OpenAPI:
flak-swagger, generating a specification - WebSockets:
flak-websocket, websockets on the JDK backend
Running
- Backends: the JDK HTTP server or Netty, and plugging Flak into a Netty server you own
- Migrating to 3.0
Runnable examples are in flak-examples, and the tests cover every feature. The test suite runs against both backends.