sarus 0.0.1-alpha.5
sarus: ^0.0.1-alpha.5 copied to clipboard
A fast, minimalistic backend framework for Dart.
example/README.md
Example #
To explore the full example you can check the official repository at example
import 'dart:io';
import 'package:example/config/router.dart';
import 'package:sarus/sarus.dart';
class SarusApplication implements Application {
@override
Future<HttpServer> run() async {
try {
final handler = const Pipeline().addHandler(router.handler);
return await serve(handler, InternetAddress.anyIPv4, 8080);
} catch (e) {
print('Error starting server: $e');
rethrow;
}
}
@override
Future<void> setup() async {
try {} catch (e) {
print('Failed to setup dependencies injection: $e');
}
}
}