-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
featureA new feature or requestA new feature or request
Description
Description
I would like to vendor a Flutter web build into Dart Frog's public directory and then serve its index.html file from Dart Frog's own root handler. I have this working in what feels like a hacky way, so I am proposing either:
- Documentation on a cleaner way
- The addition of a cleaner way, or
- Confirmation that this way is not actually hacky
Requirements
This is potentially a documentation request - I don't know!
Additional Context
In my root index.dart file, I have found that the following code works:
import 'package:dart_frog/dart_frog.dart';
import 'package:shelf_static/shelf_static.dart';
Future<Response> onRequest(RequestContext context) async {
final handler = fromShelfHandler(
createStaticHandler(
'public',
defaultDocument: 'index.html',
),
);
return handler(context);
}jtmcdole and renancaraujo
Metadata
Metadata
Labels
featureA new feature or requestA new feature or request