Introduction
In this article, I will walk trough the process it takes to publish my local project online and make it therefore available for anyone. There are many ways to achieve this, but since Next.js works so seamlessly with Vercel, Iβm gonna go with Vercel.
Deploy on Vercel
When created an Account on Vercel, I can head to the Overview tap, click on the Add New Button and choose Project. Inorder to easier access my projects, iβm gonna link Vercel with my GitHub account. Now all thats left to do is to import my repo, leave the default settings for now and deploy.
| Source |
|---|
| Vercel |
Live Updates on Main Branch
Since I told Vercel to take my projects main branch, Vercel will now watch this branch closely. Whenever I push new changes to the main branch, Vercel will detect this and update the deployed website. To make sure the deployment works, I should always run
npm run lint-fixand
npm run typeto catch and fix all issues.
| Linked Note |
|---|
| EsLint |
| Type Script Check |
Custom Domain
Vercel also allows me to easily get my own custom domain. However to this moment I havenβt tried this feature yet, but I will update this guide, once I implemented this feature for the first time. lookupβοΈ
Conclusion
When I started coding, I used to believe deploying my projects is a rocket science. Then I learned that itβs actually easier to do than I thought, while deploying some hobby projects. But Next.js in combination with Vercel just leveraged that process even further - definitely eager to explore and learn more about Vercel.