Check out a free preview of the full Advanced GraphQL, v2 course

The "Deploy to Render" Lesson is part of the full, Advanced GraphQL, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Scott demonstrates how to push a GraphQL application to production using a third party tool named render.

Preview
Close

Transcript from the "Deploy to Render" Lesson

[00:00:00]
>> So now we're talking about going into production and what you need to do to actually ship an app like this to production. Obviously you probably don't want to ship the app with a in-memory JSON database. So probably get you a real database, so do that. But besides that, there's really not much you have to do to go to production.

[00:00:16]
Use the Marco Polo server, no. All you have to do is just make sure you set your environments to production. No, don't hard code your ports, you have to do it in any server. And then pick a platform and deploy it. And don't do things that you would normally not do on other servers like hard coding environment variables and secrets and stuff like that, don't do that.

[00:00:34]
Other than that, you're pretty much good to go. So I just want to walk through deploying this on a platform that I've used a couple times over the last few weeks this see what happens. We're going to do this together. It's gonna be my first time to point your graphical server on this thing as well.

[00:00:49]
So I'm using render.com, which is like a platform as a service, kind of like a Roku where you can deploy static sites and and all types of other crazy stuff. I really love the design. And I get started here. Login on my GitHub. Make a new web service.

[00:01:07]
And I'm pretty sure it's gonna ask me to push it up to GitHub or something. So let's do that. Actually I want to check out to, let me stash this. To solution there we go, the guy got it. Yeah, I'm just gonna push up the solution 1. So they make a repo right quick.

[00:01:37]
I'll make it on mine. All right, man, I haven't made a repo on my in such a long time. All right, adv-gql V2 make that public create that repo master solution. Great. All right, so now you can go to render. I refresh that to get a new list here.

[00:02:05]
All right, where's that? There we go. That's graph UL. Cool, I will just call this Vance-gql environment, no branch solution. There is no bill command. Just install everything. Start command is, where is start command, because is yarn start. Yeah, it just start, Do that. And cool, great web service.

[00:02:38]
Single build and if it all works, it'll just work rather do anything else. I think you can also go in here and do like agile environment variables. Where's that, right here? See agile environment variables here. So I will want to do like no env is production. Definitely do that.

[00:02:54]
And that's it. If all goes well, this thing should be building. Assuming that works, any questions on deployment? No, yeah, it's pretty easy to deploy a graphical app. Basically, I want to show that there's no difference retaining the other app especially if you don't have any dependencies like a database like I don't have.

[00:03:19]
So, super simple. Yes.
>> You mentioned it's a little more complex for AWS, without going through the demonstration, talk through it in high level.
>> The only reason it's more complicated AWS is because AWS is not as simple as deploying is this. I guess it depends. I mean, man, there's so many ways to deploy our graph QL server to AWS, it really depends on if you're like you're trying to go serverless if you're trying to take advantage of Amplify, EC2, Beanstalk.

[00:03:50]
When I get down to AWS, I mean this has nothing to do with graph QL but what I like to do is use something called Terraform from Hashicorp, which is basically like infrastructure as code, so you can just write your code, I'm sure you've heard of it before.

[00:04:04]
So that's what I use if I have to deal with AWS because I just don't like to go into AWS and mess with anything. Just I don't want to do it. I mean, it looks better than it's ever done before, but no, I don't want to mess with it.

[00:04:19]
Cool, we'll let that deploy, we'll check on it later.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now