dart_webserver 1.0.0 dart_webserver: ^1.0.0 copied to clipboard
A basic HTTP server framework built in Dart inspired by expressjs.
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');
}