gazelle_core 0.7.0+1
gazelle_core: ^0.7.0+1 copied to clipboard
A lightweight Dart web framework for scalable and developer-friendly server-side projects.
example/gazelle_core_example.dart
import 'package:gazelle_core/gazelle_core.dart';
GazelleResponse<String> handler(
GazelleContext context,
GazelleRequest request,
) =>
GazelleResponse(
statusCode: GazelleHttpStatusCode.success.ok_200,
body: "Hello, Gazelle!",
);
Future<void> main() async {
try {
final app = GazelleApp(
routes: [
GazelleRoute(
name: "hello_gazelle",
).get(handler),
],
);
await app.start();
print("Gazelle listening at ${app.serverAddress}");
} catch (e) {
print("Failed to start the server: $e");
}
}