Boolean Art logo

Boolean Art

Archives
Subscribe
April 2, 2025

Setup NEXT_PUBLIC_BASE_URL πŸš€

No, its not a placeholder, I did mean to say NEXT_PUBLIC_BASE_URL πŸ˜…

A lot of advanced features on a website depend upon the full canonical url of your site including the domain used for deployment. For this purpose setting up a variable that gives you your site base url can greatly simplify your code.


During development we want
http - localhost:3000
For preview environment we want
https - generated_preview_url
For production we want
https - domain_for_production

Full guide with VERCEL (free community resource) πŸ•ΊπŸ»

https://www.booleanart.com/course/nextjs/base-url
Don't miss what's next. Subscribe to Boolean Art:
Share this email:
Share on Facebook Share on Twitter Share on LinkedIn
GitHub
X
Facebook
LinkedIn
Website favicon
Powered by Buttondown, the easiest way to start and grow your newsletter.