shelf_hotreload 1.1.0 copy "shelf_hotreload: ^1.1.0" to clipboard
shelf_hotreload: ^1.1.0 copied to clipboard

outdated

Wrapper to easily enable hot-reload for shelf applications.

example/example.md

import 'dart:io';

import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_hotreload/shelf_hotreload.dart';

// Run this app with --enable-vm-service (or use debug run)
void main() async {
  withHotreload(() => createServer());
}

Future<HttpServer> createServer() {
  handler(shelf.Request request) => shelf.Response.ok('hot!');
  return io.serve(handler, 'localhost', 8080);
}
53
likes
0
pub points
85%
popularity

Publisher

verified publisherfelix-blaschke.de

Wrapper to easily enable hot-reload for shelf applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

hotreloader, intl

More

Packages that depend on shelf_hotreload