vercel is the best platform to deploy and test your next.js application. Let's see how you can deploy there for free.
for this, you'll need to have one account:
- vercel (ofc)
first of all, make a git repository with a next.js project
npx create-next-app
git init
Now install vercel globally:
npm i -g vercel
# or
yarn add -g vercel
deploy !
vercel
? Set up and deploy “~/web/my-new-project”? [Y/n] y
? Which scope do you want to deploy to? My Awesome Team
? Link to existing project? [y/N] n
? What’s your project’s name? my-new-project
? In which directory is your code located? my-new-project/
Auto-detected project settings (Next.js):
- Build Command: `next build` or `build` from `package.json`
- Output Directory: Next.js default
- Development Command: next dev --port $PORT
? Want to override the settings? [y/N]
# and for production
vercel --prod
Top comments (0)