jaguar_examples_static_file 2.2.0 copy "jaguar_examples_static_file: ^2.2.0" to clipboard
jaguar_examples_static_file: ^2.2.0 copied to clipboard

Example showcasing how to serve static files using Jaguar

static_file #

Example to demonstrate serving static files using Jaguar. Uses staticFiles method on Jaguar object.

import 'package:jaguar/jaguar.dart';
import 'package:path/path.dart' as p;

main(List<String> arguments) async {
  final server = new Jaguar(port: 10001);

  // Serve with prefix stripped. Similar to 'alias' in Nginx.
  server.staticFiles('/static/*', 'static');

  await server.serve();
}

Instructions #

Instructions can be found at: Serving static files

0
likes
10
pub points
0%
popularity

Publisher

unverified uploader

Example showcasing how to serve static files using Jaguar

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

jaguar, path

More

Packages that depend on jaguar_examples_static_file