Hello,

" I've got a node server (express) that needs to serve files from Storage "

So from what I understand, your express server is dynamically serving files 
from your storage. Is this storage referring to storage attached to the 
instance? Or are you dynamically  returning a link to Google Cloud Storage? 
I am just asking something that it is not clear in the information that you 
provided but it will help to address your main question.

I would like to share that GAE has a feature to serve static files which 
you should evaluate in your use case. For instance, instead of using the 
above "storage", you can upload these resources with your application (when 
you deploy your application in GAE) and you will need to modify your 
app.yml file to indicate what files/folder should be managed statically. 
This means google will deliver the files without calling your application 
using their cache assigned to this service(GAE). This has two benefits: 
Faster delivery times for this resource and no bandwidth cost as your 
application is not called to delivered these static resources but it is 
managed by Google internal infrastructure. You can learn more about this 
here[1]. Based on this information, I hope you can evaluate if serving 
static resources suits your use case.


[1] See static_dir and static_files entries 
here: https://cloud.google.com/appengine/docs/standard/nodejs/config/appref

On Monday, October 12, 2020 at 1:15:15 PM UTC-4 Olu wrote:

> Hello, 
>
> Just for better understanding, do you mean you are looking to have your 
> App Engine application serve files from Google Cloud Storage[1]? I am not 
> sure about the Storage you referenced in the first line of description 
> "I've got a node server (express) that needs to serve files from Storage". 
> Which Storage? Cloud Storage?
>
> [1]
> https://cloud.google.com/appengine/docs/standard/nodejs/serving-static-files#serving_files_from
> On Thursday, October 8, 2020 at 7:22:14 PM UTC-4 kvinte...@gmail.com 
> wrote:
>
>> Hi,
>>
>> I've got a node server (express) that needs to serve files from Storage. 
>> The url would look something like example.com/thumbnails/filename.jpg
>>
>> I have registered a route with express for /thumbnails/:id which works 
>> fine locally on my computer, but on appspot.com it will try to serve me 
>> a static file instead, which it will not find. I will get a 404 error 
>> without the server handler ever being invoked.
>>
>> I have a running server with a debug route here: 
>> https://fiid-ee.ey.r.appspot.com/api/test/asdasda
>>
>> The above URL works fine and the handler should just respond with 
>> whatever is after test/
>>
>> If you add a .jpg extension, the server will give me a 404: 
>> https://fiid-ee.ey.r.appspot.com/api/test/asdasdasd.jpg
>>
>> Again, I tested this locally and it doesn't seem to be a feature of the 
>> server. The 404 page itself is not something implemented in Express nor 
>> Nuxt.js
>>
>

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b8734c2a-3379-417f-8cfa-c00af6ed1287n%40googlegroups.com.

Reply via email to