Server side rendering(Optional)

Server side rendering is fully optional. If you don't want the Server side rendering, You can skip this page.

Requirements

  • Node 12+

Configuration

  1. Extract the downloaded .zip file from codecanyon on your PC. You’ll find a folder named Docker after extracting.
  2. Go to the Docker > Frontend folder.
  3. Edit the .env file
  4. Change the value of API_BASE to the Root Url of your admin panel. http://www.yourdomain.com/ Please don't forget to add / at the end of the URL

Deployment

It's time to create a node js app

Node js app creation

  1. Log in to your cPanel account.
  2. Scroll down to the "Software" section and click on "Set up node.js app".
  3. Click on Create Application.
  4. Create a node.js app by fill up these values.
    • Application root: server public_html or subdomain directory you intend to run the script.
    • Application URL: Your domain
    • Application startup file: app.js

Now it's time to build locally and upload it to the server.

Building the frontend

  1. Go to the Frontend folder in your computer
  2. Now open the command prompt in the folder
  3. Now run npm install
  4. Now run npm run build
    • You have to have node js installed in your computer
    • Make sure the version of node is same for your local machine and server machine
    • To check the version of node js, please run this command in the command prompt
  5. Now compress the whole front end and upload to your server public_html or subdomain directory you intend to run the script.
  6. Unzip the file

You can browse the website now.