Skip to content

knakamigawa/dart_server_arm64_sample

Repository files navigation

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>

Running the sample

Running with the Dart SDK

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

Running with Docker Compose

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages