What is a typical workflow for deployment of a dyn...
# prisma-whats-new
j
What is a typical workflow for deployment of a dynamic graphcool site? Do you push frontend code to AWS or somewhere and then all the backend stuff stays at graphcool? If so, what kinds of places do you guys recommend for the hosting of the front-end code. I see that Surge was used in the howToGraphQL example, but the site I'm building is dynamic (a CRM type application) so I assume Surge won't work for my purposes.
f
I use Cloudfront > s3 > Lambda [Yoga] > Prisma > RDS .. front end is all in React
👍 2
c
I'm using Firebase hosting: https://firebase.google.com/docs/hosting/ It's like S3 + cloudfront but way less config and functionally the same
j
@Christian So firebase can handle dynamic sites where each user has different data coming and going? On the page that you sent the link to it says "provides fast and secure static hosting", but I also see that they have database hosting included so I don't quite understand what their capabilities are.
c
@Jonathan Firebase also has hosted database products (realtime database and firestore) that are like a shittier version of graphcool. I'm just using them for static hosting (which is what you would get from S3 and cloudfront), but you can also define custom node functions to serve some URLs: https://firebase.google.com/docs/hosting/functions
imo the best site design right now is static frontend and a dynamic GraphQL database, so all your users get the same frontend html+css+js bundle that figures out what dynamic data it needs from the backend to render that user's specific page
j
To my knowledge, that's how I'm designing my app. I guess I just don't know how to set it up properly. If I take a normal Vue site with no backend and then deploy the dist folder to Surge or Netlify I have not issues. If I do the same with a site that has a graphcool backend wired up, everything works fine on local host, but nothing works once deployed to Netlify or Surge. I assumed I needed a different kind of backend infrastructure, but maybe there's something I'm just not configuring right.
c
Configuration is my prime suspect - netlify and surge should work just fine statically hosting a Vue site connected to a graphql backend
where is your graphql backend hosted?
j
Yep, I got it figured out. I had some kind authentication error that was blocking the data from coming through. Everything seems to be working now.
🦜 2
Thanks for the help!
So what makes you favor Firebase over Netlify, Surge, and others?
c
I came to GraphQL from firebase, so I have more experience with it ¯\_(ツ)_/¯ From what I've heard of netlify it's probably just as good if not better. I'd just encourage you to steer away from S3/Route53. AWS is super powerful and probably what these services are running on, but the configuration is needlessly complicated
j
That was exactly my goal. I've been reading articles all day showing backend AWS configurations that have a dozen or more different services wired together. I came from Meteor where deploying to their Galaxy servers is simply 'deploy serverLocaion' and you're done. So glad to know that I can keep a similar workflow working with GraphCool