Deploying the Web Application
This guide will walk you through the process of deploying your Elite Quiz web application to a production server.
Building for Production
-
After all the changes, you are ready to deploy your Web application on a Live Server.
-
Open VS Code terminal by typing CTRL+J in Windows/Linux, or CMD+J for MacOS and execute the command:
npm run exportThis will take a few seconds to build the live and optimized version of the web application.
-
After the process completes, go to web's code root files -> out folder and upload these files to your live server.
ImportantOnly upload the out folder's files on the server. Do not upload any other files to the server.
-
If you're facing any deployment-related problems, you can follow the official documentation: Next.js Web Deployment
How to Update to a New Version
If you need to update your web application to a new version:
- Extract the zip file of web code which you get from CodeCanyon.
- Open the web code in VS Code editor.
- Download Node.js (version 20) from here if not already installed.
- Open the .env file in your project.
- Add your admin URL and web URL as per the documentation.
- Add your title, description, keywords, and other details in the .env file.
- Run the command:
npm iin your terminal. - Run the command:
npm run exportto build your project. - After the
outfolder is created, make a zip of theoutfolder and upload the contents inside theoutfolder to your web domain or subdomain server.
Deployment Options
Traditional Web Hosting
- Upload the contents of the
outfolder to your web server using FTP or SSH - Configure your web server to serve the files correctly
Deployment Platforms
Elite Quiz can be deployed on various platforms:
- Vercel: Optimal for Next.js applications
- Netlify: Easy deployment with continuous integration
- Firebase Hosting: Fast and secure hosting with good integration with other Firebase services
- GitHub Pages: Free hosting for static websites
- AWS S3 + CloudFront: Scalable and high-performance option
Post-Deployment Verification
After deploying, verify the following:
- The site loads correctly at your domain
- User authentication works properly
- API calls are successful
- All features function as expected
- No console errors appear
- The site is responsive on different devices
Setting Up a Custom Domain
If you're using a custom domain:
- Purchase a domain from a domain registrar
- Configure your DNS settings to point to your hosting provider
- Add SSL certificate for HTTPS (many hosting providers offer this automatically)