DEV Community

Cover image for Deploying A Next.js App On Vercel
????
????

Posted on • Originally published at atordvairn.js.cool

Deploying A Next.js App On Vercel

next.js logo
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:

first of all, make a git repository with a next.js project

npx create-next-app
git init
Enter fullscreen mode Exit fullscreen mode

Now install vercel globally:

npm i -g vercel
# or
yarn add -g vercel
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

read more here

Top comments (0)