Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support firebase regions other than the default #13341

Closed
danielroe opened this issue Feb 8, 2022 · 4 comments
Closed

Support firebase regions other than the default #13341

danielroe opened this issue Feb 8, 2022 · 4 comments

Comments

@danielroe
Copy link
Member

See https://firebase.google.com/docs/functions/manage-functions#modify-region

context: https://github.com/nuxt/framework/discussions/3123

@pi0
Copy link
Member

pi0 commented Apr 12, 2022

unjs/nitro#90

@pi0 pi0 closed this as completed Apr 12, 2022
@mulhoon
Copy link

mulhoon commented Jan 11, 2023

It would be nice to define the default region somehow, but firebase.json doesn't support that. So regions are usually defined per function:

exports.webhookEurope = functions
    .region('europe-west1')
    .https.onRequest((req, res) => {
            res.send("Hello from Europe");
    });

How could it be defined in the nuxt handler?

export default defineEventHandler((event) => {
  return {
    message:"Hello"
  }
})

This seems tricky... Could it be that we use the folder structure somehow? For example, if you're using Firebase then you could do the following:

server/api/europe-west1/posts.get.ts
server/api/asia-southeast1/posts.get.ts

or...

server/api/posts.get.europe-west1.ts
server/api/posts.get.asia-southeast1.ts

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
@chrisspiegl
Copy link

Is this closed because it is possible now with configuration of not happening?

I am looking at this for SSR processing of a nuxt site and it seems I can't set the region in any way?

@danielroe
Copy link
Member Author

This is now being tracked in the upstream issue linked in the above comment: unjs/nitro#90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants