Skip to content

Server Side Rendering (Optional)

This step is completely optional. If you do not need Server Side Rendering (SSR), you can skip this section and continue using the standard setup.

Requirements

Before proceeding, make sure your server meets the following requirement:

  • Node.js 20+

Configuration

Follow these steps to configure SSR:

  1. Extract the downloaded .zip file from Codecanyon on your PC.
    After extracting, you will find a folder named Docker.
  2. Go to the Docker > Frontend folder.
  3. Open and edit the .env.prod file.
  4. Change the value of API_BASE to the root URL of your admin panel.
  5. Example: http://www.yourdomain.com/

⚠️ Make sure to add / at the end of the URL.

Node.js App Creation

Follow these steps to create the Node.js application in cPanel:

  1. Log in to your cPanel account.
  2. Scroll down to the Software section.
  3. Click on Set up Node.js App.
  4. Click on Create Application.
  5. Fill in the following details:
  • Application root: public_html or the subdomain directory where you want to run the script.
  • Application URL: Your domain.
  • Application startup file: .output/server/index.mjs

After completing the form, create the application.

Building the Frontend

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

  1. Go to the Frontend folder on your computer.
  2. Open Command Prompt (or Terminal) inside that folder.
  3. Run:
bash
npm install
  1. Then run:
bash
npm run build

Important Notes

  • Node.js must be installed on your computer.
  • Make sure the Node.js version on your local machine matches the version on your server.
  • To check your Node.js version, run:
bash
node -v
  1. After building, compress the entire frontend folder.
  2. Upload it to your server inside public_html or your intended subdomain directory.
  3. Extract the uploaded file.
  4. Your website should now be accessible.

✅ SSR setup is now complete.