This is a sample Dart web server for arm64(M1 Mac).
A server app built using Shelf, configured to enable running with Docker.
This sample code handles HTTP GET requests to /
and /echo/<message>
You can run the example with the Dart SDK like this:
$ dart run bin/server.dart
Server listening on port 8080
And then from a second terminal:
$ curl http://0.0.0.0:8080
Hello, World!
$ curl http://0.0.0.0:8080/echo/I_love_Dart
I_love_Dart
If you have Docker Desktop installed, you
can build and run with the docker
command:
$ docker compose up -d
⠿ Container dart_shelf-app-1 Running