gazelle_core 0.3.0
gazelle_core: ^0.3.0 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';
Future<void> main() async {
try {
final app = GazelleApp(
routes: [
GazelleRoute(
name: "hello_gazelle",
get: (context, request, response) => GazelleResponse(
statusCode: GazelleHttpStatusCode.success.ok_200,
body: "Hello, Gazelle!",
),
),
],
);
await app.start();
print("Gazelle listening at ${app.serverAddress}");
} catch (e) {
print("Failed to start the server: $e");
}
}