I revisited this again recently and wrote a drop-in Flask extension that 
serves app.yaml static file and directory handlers: flask-gae-static 
<https://github.com/snarfed/flask-gae-static>. Feedback is welcome!

On Sunday, October 31, 2021 at 10:39:33 AM UTC-7 Ryan B wrote:

> Resurrecting this year and a half old thread to plug 
> https://github.com/XeoN-GHMB/app_server , a little dev_appserver 
> replacement that wraps your existing local app server and adds static file 
> serving that supports app.yaml static_* handlers. Sounds similar to the 40 
> line middleware you mentioned.
>
> I was finally forced to migrate away from dev_appserver due to the 
> continued degrading of the Python 2 ecosystem. Specifically, when I 
> migrated to macOS Monterey, dev_appserver failed to start and complained, 
> Cannot 
> use the Cloud Datastore Emulator because the packaged grpcio is 
> incompatible to this system. Please install grpcio using pip. I tried to 
> install grpcio for Python 2, but Montery doesn't include Python 2's pip, 
> and easy_install couldn't install it. app_server to the rescue!
>
> On Sunday, December 15, 2019 at 9:22:49 AM UTC-8 [email protected] wrote:
>
>> Hi Ryan,
>>  
>>
>>> understood, but using a different static file server is not great. it 
>>> makes local development diverge significantly from production. local no 
>>> longer uses or tests app.yaml's static file handlers, but prod does, so 
>>> bugs will eventually pop up that only happen in production, and are thus 
>>> harder to test for and debug.
>>>
>>
>> The way I solve this is to have a little piece of middleware (only in dev 
>> mode) that loads app.yaml and serves the static_* handlers statically. The 
>> basic logic (I might not be handling all cover cases, but it works for me) 
>> is pretty simple, and the entire middleware class takes about 40 lines of 
>> code.
>>
>> thanks,
>> Remko
>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/369fedf4-ea0b-46a3-a62e-1e629af518cfn%40googlegroups.com.
  • [google-appengin... Ryan B
    • Re: [google... 'Andrew Gorcester' via Google App Engine
      • Re: [go... Ryan Barrett
        • Re:... 'Andrew Gorcester' via Google App Engine
        • Re:... Remko Tronçon
          • ... Ruby Tokantekai
            • ... 'Katayoon (Cloud Platform Support)' via Google App Engine
          • ... Ryan B
            • ... Ryan B
              • ... 'George (Cloud Platform Support)' via Google App Engine

Reply via email to