Deployment
Deployment guide for your application.
Setup
The best way to deploy your application is to use a cloud provider like Vercel, Netlify, or AWS. These platforms offer easy deployment options and integrate well with modern web applications.
In my case, I used Vercel to deploy my application. Vercel provides a seamless integration with Next.js and offers features like automatic scaling, serverless functions, and a global CDN out of the box.
The easiest way to deploy your application is to send your code to a Git repository (GitHub, GitLab, etc.) and connect it to Vercel.
Once it's connected it'll continuously deploy your application whenever you push changes to the main
branch.
But attention that at first it might not work properly especially if you have not configured your environment variables or other settings correctly.
So go to your Vercel dashboard and check the settings for your project. Make sure all environment variables are set correctly and that your project is configured to use the right framework (Next.js in my case).
Remember to use the same name you used in your .env.local
file for the environment variables in Vercel.
Remember:
Remember to set sensitive environment variables in Vercel's dashboard, not in your code. In Vercel, there's a way to hide environment variables from the build logs by setting them as sensitive.
That's pretty much it! Every time you make changes to your code and push them to the main
branch, Vercel will automatically deploy your application.
They also already provide a generic url (https://your-project-name.vercel.app) that you can update later on.