This guide will help you deploy your Next.JS app on Zeabur in just a few clicks.
Next.js is a flexible React framework that gives you building blocks to create fast web applications.
To start, we need to prepare the application. Launch your terminal and execute the command below to set up the CLI.
`npx create-next-app@latest my-app`
After you’ve created the application, you will get a project with a structure like the following picture.
And as you can see, the app we’ve created is using Next.js 14.0.0 now.
Then, you just need to create a remote repository to store your codes.
If you haven't set up a Zeabur account yet, you'll want to do so once your repository is prepared.
Head over to https://zeabur.com and click on the Get Started button. A modal will appear showcasing a 'login with GitHub' button. Click on it, grant Zeabur permission to connect with your GitHub, and voila! You'll have your Zeabur account set up.
In the dashboard of Zeabur, press on the Create Project button to select a region you prefer, then Zeabur will create a project in the selected region for you.
On the project page, find and select the Deploy New Service button. From there, choose Deploy from GitHub. Lastly, hit the configuration button to grant Zeabur permission to your repository.
Once you've completed the configuration, simply locate your application and select it to initiate deployment.
It'll take roughly 3 minutes for the build process, after which your Next.JS application will be up and running.
As you can see, Zeabur will automatically detect that your application’s framework is Next.JS.
If you wish to access your application, you must assign a domain to it. Navigate to the domain tab within the service page. There, you have the option to select Generate Domain to avail of a complimentary domain with a .zeabur.app extension. Choose an appropriate domain, hit save, and then you're all set to access your service via the chosen domain.