relic 0.15.1
relic: ^0.15.1 copied to clipboard
A lightweight and flexible web server inspired by Shelf for building APIs and backend services.
import 'package:relic/relic.dart';
/// A simple 'Hello World' server demonstrating basic Relic usage.
Future<void> main() async {
final app = RelicApp()..get('/hello/:name', helloHandler);
await app.serve();
}
Response helloHandler(final Request req) {
final name = req.rawPathParameters[#name];
return Response.ok(body: Body.fromString('Hello, $name!\n'));
}