fallstrick_hosting 0.0.3
fallstrick_hosting: ^0.0.3

Dart native
Flutter Android iOS

Code for hosting and starting up an Fallstrick application

fallstrick_hosting #

language license

Usage #

A simple usage example:

import 'package:fallstrick_hosting/fallstrick_hosting.dart';

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

WebHostBuilder createWebHostBuilder(String address, int port) {
  return WebHostBuilder().useHttpListener(address, port).configure((app) {
    app.use(fooMiddleware);
    app.use(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);
  };
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
80
pub points
0%
popularity

Code for hosting and starting up an Fallstrick application

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

kayshen.xu@gmail.com

License

MIT (LICENSE)

More

Packages that depend on fallstrick_hosting