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

outdated

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'));

  app.use((ctx, next) async {
    ctx.body ??= 'error';
  });

  /// Start server listen on localhost:8080
  app
      .listen('localhost', 8080)
      .then((info) => print('Server started on http://localhost:8080'));
}
1
likes
0
pub points
62%
popularity

Publisher

verified publisherawcoding.com

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

convert, dia, mime, path

More

Packages that depend on dia_static