A simple Dart HTTP server using package:shelf.
- Listens on "any IP" (0.0.0.0) instead of loop-back (localhost, 127.0.0.1) to allow remote connections.
- Defaults to listening on port
8080, but this can be configured by setting thePORTenvironment variable. (This is also the convention used by Cloud Run.) - Includes
Dockerfilefor easy containerization
To run this server locally, run as follows:
$ dart run bin/server.dartTo deploy on Cloud Run, click
or follow these instructions.
Use tool/deploy_source.sh to build and
deploy using the
OS-only runtimes
feature.
Note
As of January 2026, this feature is in "Preview" and requires the ["beta" gcloud component][gcloud-beta].