Hosting possibilities for gatsby app that does data fetching #27887
-
Hi, I would like to know which considerations I should make for hosting gatsby and especially for an application that requires data fetching at runtime as done so in this example https://github.com/gatsbyjs/gatsby/tree/master/examples/data-fetching @LekoArts Can you provide me with some solutions please Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Gatsby isn't doing anything unique for data fetching that other javascript applications are doing. So really the same rules & challenges apply. If you want a unified approach you could use something like Azure Static Web apps or Netlify functions. If your backend is hosted on a different domain then you may have CORS to setup. But otherwise theirs not really any additional complexity. Your general considerations will be around security, scalability, consistency, ease of deployment, etc. These are all massive topics though! |
Beta Was this translation helpful? Give feedback.
-
Like @herecydev mentioned, you can host it everywhere. For dynamic data fetching, you'll need an API server that can give you the data. In the jamstack, mostly serverless API functions are used like azure function, AWS lambda, ... |
Beta Was this translation helpful? Give feedback.
Gatsby isn't doing anything unique for data fetching that other javascript applications are doing. So really the same rules & challenges apply. If you want a unified approach you could use something like Azure Static Web apps or Netlify functions.
If your backend is hosted on a different domain then you may have CORS to setup. But otherwise theirs not really any additional complexity.
Your general considerations will be around security, scalability, consistency, ease of deployment, etc. These are all massive topics though!