0 purchases
spry static
Spry Static #
spry_static is a Handle/Middleware for the Dart Spry framework.
Installation #
Add spry_static to your pubspec.yaml:
dependencies:
spry_static: any
copied to clipboard
Or install it from the command line:
dart pub add spry_static
copied to clipboard
Example #
import 'package:spry/spry.dart';
import 'package:spry_static/spry_static.dart';
void main() async {
final Spry spry = Spry();
final Static static = Static.directory(
directory: 'static',
defaultFiles: ['index.html'],
);
await spry.listen(static, port: 3000);
print('Listening on port http://localhost:3000');
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.