Closed utamori closed 2 years ago
Hi @utamori 👋 Thanks for opening an issue!
This can be achieved using a custom entrypoint.
import 'dart:io';
import 'package:dart_frog/dart_frog.dart';
Future<HttpServer> run(Handler handler, InternetAddress ip, int port) {
final cascade = Cascade()
.add(createStaticFileHandler(path: 'frontend/build/web'))
.add(handler);
return serve(cascade.handler, ip, port);
}
Let me know if that helps 👍
Closing for now since there aren't any actionable next steps. Feel free to comment with any additional questions and I'm happy to continue the conversation 👍
@felangel thanks! It worked fine. It would be helpful if the documentation mentioned how to do this https://dartfrog.vgv.dev/docs/basics/serving-static-files
Description
I would like to distribute Flutter Web apps on Frog. The directory structure should look like this Flutter does not allow you to specify the output path at build time. by moving
frontend/build/web
topublic
folder apps can be serve on Frog If we could specify a path other than public in Frog to serve static files, this one step would be eliminated.Requirements
public
. For example,frontend/build/web
.Additional Context
There is a package that does the same thing with go server
It would be very useful for certain applications if Frog and Flutter Web could do the same thing!
https://github.com/shibukawa/frontend-go