Deployment
Last updated
Last updated
There are a number of ways to deploy your Sample App to a live webpage. For less experienced developers, we recommend Netlify.
Netlify lets you link a GitHub, GitLab, or Bitbucket repository to a site for continuous deployment. Each time you push to your Git provider, Netlify runs a build with your tool of choice and deploys the result to their CDN.
Or order for Sample App to deploy correctly on Netlify be sure to configure the Build settings (found under >Deploy>Deploy Settings for your Site) the following way:
You also need to set up the Environment Variablesusing the same ASSETLAYER_URL, ASSETLAYER_APP_ID, ASSETLAYER_APP_SECRET, NEXTAUTH_SECRET, and ENCRYPTION_SECRET you used locally. For ENVIRONMENT, you can use "dev" or "production" as needed.
Read more about it from official docs
Next.js can be deployed to any hosting provider that supports Node.js. Make sure your package.json
has the "build"
and "start"
scripts:
next build
builds the production application in the .next
folder. After building, next start
starts a Node.js server that supports hybrid pages, serving both statically generated and server-side rendered pages.
The easiest way to deploy Next.js to production is to use the Vercel
platform from the creators of Next.js. Vercel
is a cloud platform for static sites, hybrid apps, and Serverless Functions. Read more about it from official docs
Using the Firebase CLI, you deploy files from local directories on your computer to your Hosting server. Beyond serving static content, you can use Cloud Functions for Firebase or Cloud Run to serve dynamic content and host microservices on your sites. Read more about it from official docs.