Server side rendering(Optional)
Server side rendering is fully optional. If you don't want the Server side rendering, You can skip this page.
- Node 12+
- Extract the downloaded .zip file from codecanyon on your PC. You’ll find a folder named Docker after extracting.
- Go to the Docker > Frontend folder.
- Edit the .env file
- 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
It's time to create a node js app
Node js app creation
- Log in to your cPanel account.
- Scroll down to the "Software" section and click on "Set up node.js app".
- Click on Create Application.
- 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
- Go to the Frontend folder in your computer
- Now open the command prompt in the folder
- Now run npm install
- 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
- Now compress the whole front end and upload to your server public_html or subdomain directory you intend to run the script.
- Unzip the file
You can browse the website now.