dart-archive / stagehand

Dart project generator - web apps, console apps, servers, and more.
https://pub.dev/packages/stagehand
BSD 3-Clause "New" or "Revised" License
649 stars 118 forks source link

Make server-shelf compatible with Cloud Run #611

Closed domesticmouse closed 5 years ago

domesticmouse commented 5 years ago

Cloud Run has a couple of requirements of apps that it attempts to run. The first is that they bind to the port specified in the PORT environment variable, and the second is that it listens to 0.0.0.0 instead of localhost. This change should make it as simple as adding a simple Dockerfile to the generated sample app to get it running on Cloud Run.

kevmoo commented 5 years ago

re-run pub run build_runner build – would be good.

domesticmouse commented 5 years ago

PTAL @kevmoo

kevmoo commented 5 years ago

In theory we could publish this now, although I don't know if there is any urgency.

CC @kwalrath

domesticmouse commented 5 years ago

This change came out of a Flutter Hackathon event where I and an attendee tried to use Dart on Cloud Run to act as the server side of a Flutter app. We both burned the majority of the event trying to figure out what we were doing wrong. Please publish this ASAP to prevent developer frustration.

Thanks!

kevmoo commented 5 years ago

Deployed as 3.3.1!