dia_static 0.1.2 copy "dia_static: ^0.1.2" to clipboard
dia_static: ^0.1.2 copied to clipboard

The middleware for Dia http server, for serving static files. Make Dia in webserver for static content).

example/dia_static_example.dart

import 'package:dia/dia.dart';
import 'package:dia_static/dia_static.dart';

void main() {
  final app = App();

  /// Serve files from example folder
  app.use(serve('./example', prefix: '/download', index: 'index.html'));

  /// Start server listen on localhost:8080
  app.listen('localhost', 8080).then((info) =>
      print('Server start serving file on http://localhost:8080/download/'));
}
copied to clipboard
1
likes
150
points
214
downloads

Publisher

verified publisherawcoding.com

Weekly Downloads

2024.09.26 - 2025.04.10

The middleware for Dia http server, for serving static files. Make Dia in webserver for static content).

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

convert, dia, mime, path

More

Packages that depend on dia_static