sahilrajput.com

Learn Vercel Deployment

Quick Links:

TODO: Deploy ExpressJs Application with Vercel

Route all paths to index.html page for a vite application by updating vercel.json file

Source: Click here

File: vercel.json

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Vercel recommends pusher.com for deployment of realtime apps(i.e, requiring websockets (socket.io)

Source: A comment on this stackoverflow answer

https://vercel.com/guides/deploying-pusher-channels-with-vercel

Direct domain to vercel hosting

NS1.VERCEL-DNS.COM
NS2.VERCEL-DNS.COM

drawing

we can change the connected git repository of in a vercel project

You need to first disconnect the connected repo and then you need to connect another git repo there, its very simply. Vercel is amazing.

drawing

vercel uses yarn by default

So to use npm instead of yarn you can specify the build and run command like that:

drawing

Nested vitejs folder deployment commadns to be used

Way1:

image

Way2:

image