A
A
Alexey Noir2020-06-18 16:12:59
Software Deployment
Alexey Noir, 2020-06-18 16:12:59

How to deploy a site with API endpoints if the domain name is generated during the deployment process?

Hello!

I made a site on Next.js with API endpoints, started deploying. I learned that depending on the environment, it is necessary to create environment variables (I am a front-end developer, I don’t know much about the back-end yet). As far as I understand, depending on process.env.NODE_ENVwe prescribe either for development, or a domain name for production. But, for example, if I want to deploy a site on Netlify (from github), then the domain name is generated during the deployment process and is not known in advance, then what should I do? localhost:3000

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-06-18
@inoise

Buy a domain and register a CNAME

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question