dart_webserver 1.0.0 copy "dart_webserver: ^1.0.0" to clipboard
dart_webserver: ^1.0.0 copied to clipboard

A basic HTTP server framework built in Dart inspired by expressjs.

example/example.dart

import 'package:dart_webserver/dart_webserver.dart';

void main() async {
  final app = WebServer();

  app.get('/', (req, res, next) async {
    var list = [];

    for (var i = 0; i < 10000; i++) {
      list.add(
        {
          '_id': '124p091u752018937u25',
          'name': 'Connard',
          'age': 12,
          'test': {'foo': 'bar'},
        },
      );
    }

    return list;
  });

  await app.bind(3000);

  Debug.info('Server started! http://localhost:3000');
}
3
likes
120
pub points
0%
popularity

Publisher

verified publisherjroussel.fr

A basic HTTP server framework built in Dart inspired by expressjs.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ansicolor

More

Packages that depend on dart_webserver