tiga 0.0.1 copy "tiga: ^0.0.1" to clipboard
tiga: ^0.0.1 copied to clipboard

discontinued

A Web Framework For Dart Serve

example/tiga_example.dart

import 'package:tiga/tiga.dart';

main() {
  createWebHostBuilder("localhost", 8080).build().run();
}

WebHostBuilder createWebHostBuilder(String address, int port) {
  return WebHostBuilder()
      .useHttpListener(address, port)
      .addMiddleware(fooMiddleware)
      .addMiddleware(headerMiddleware);
}

RequestDelegate fooMiddleware(RequestDelegate next) {
  return (context) {
    context.response.writeAsync("Foo==>");
    next(context);
  };
}

RequestDelegate headerMiddleware(RequestDelegate next) {
  return (context) {
    context.response.writeAsync("header==>");
    next(context);
  };
}
0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

A Web Framework For Dart Serve

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on tiga