steward 0.4.0 copy "steward: ^0.4.0" to clipboard
steward: ^0.4.0 copied to clipboard

Steward is a CLI and Framework for building expressive web servers in Dart.

example/main.dart

import 'package:steward/app/app.dart';
import 'package:steward/router/router.dart';

Future main() async {
  final router = Router();

  router.staticFiles('/assets');
  router.get('/hello', (Context context) async {
    return Response.Ok('Hello World!');
  });

  router.get('/config', (Context context) async {
    print(context.read('@config'));
    return Response.Ok(context.read('@config'));
  });

  router.get('/:name', (Context context) async {
    return Response.Ok(context.request.pathParams['name']);
  });

  final app = App(router: router);

  return app.start();
}
3
likes
140
pub points
0%
popularity

Publisher

unverified uploader

Steward is a CLI and Framework for building expressive web servers in Dart.

Repository
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

bosun, flat, mustache_template, path_to_regexp, recase, xml, yaml

More

Packages that depend on steward