Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 923 Bytes

README.md

File metadata and controls

41 lines (30 loc) · 923 Bytes

🌐 dart_cors_proxy

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 3000

And then from a second terminal:

$ curl http://0.0.0.0:3000/https://google.com
(the google page)

⚡️ Running with Docker

If you have Docker Desktop installed, you can build and run with the docker command:

$ docker build . -t dart_cors_proxy
$ docker run -it -p 3000:3000 myserver
Server listening on port 3000

And then from a second terminal:

$ curl http://0.0.0.0:3000/https://google.com
(the google page)