dpress 0.0.1+Omicron copy "dpress: ^0.0.1+Omicron" to clipboard
dpress: ^0.0.1+Omicron copied to clipboard

A lightweight express like framework.

example/dpress_example.dart

import 'package:dpress/dpress.dart';

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

  app.addRoute("/", "GET", (DpressRequest request, DpressResponse response) {
    response.send("Hello, /!");
  });

  app.get("/a", (DpressRequest request, DpressResponse response) {
    response.send("Hello, /a!");
  });

  app.addRoute("/hello", "GET", (DpressRequest request, DpressResponse response) {
    response.send("Hello, World!");
  });

  app.addRoute("/hello", "POST", (DpressRequest request, DpressResponse response) {
    response.send("Hello, POST!");
  });

  await app.start();
}
0
likes
0
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight express like framework.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dpress