From the course: The Freelance Stack: Real Project with Next.js and Strapi

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Deployment of Next.js frontend to Heroku

Deployment of Next.js frontend to Heroku

So that is Strapi completely done and everything migrated from local now the only thing we have to do is actually host the front-end and start using our deployed version of Strapi so for us we can just open our front-end repository right here and This one will be a lot a lot a lot simpler to work with compared to Strapi So the first thing here is that we have an environment variable that is called next public Strapi url that is currently pointing to our local to our local version. Now that's not the only place where we're communicating with Strapi, because we have this strapi.utils file right here that defines the base url here at the top as the environment variable strapi.url which we don't have at the moment. So what we got to do is we got to create that and in here we're just going to call this strapi.url and what it should point to is our actual deployed Strapi version. So that is this one right here. You can just take everything before admin, copy that, and plug it right in here.…

Contents