The Appengine docs explain that using express to serve files is for local 
development [1], hence why it works on your local environment.

However, to serve files from a deployed Appengine, you must specify the 
routes in your app.yaml file [2].

[1] 
https://cloud.google.com/appengine/docs/standard/nodejs/serving-static-files#serving_files_for_local_development
[2] 
https://cloud.google.com/appengine/docs/standard/nodejs/serving-static-files#serving_from_your_application

On Friday, October 9, 2020 at 1:22:14 AM UTC+2, Amiran G 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/700b5073-cdfa-4aad-966e-32c22c01ea4co%40googlegroups.com.

Reply via email to