Free Consultation
Get Technical Help

cPanel Main Domain

Deploy StripCard on your primary domain (example: https://yourdomain.com)

1

Install project dependencies

Open the project folder on your terminal and run the install command.

Terminal
npm install
2

Build the project

Once the install is complete, create a production build of the app.

Terminal
npm run build
3

Create the server.cjs file

In the root of your project, create a new file named server.cjs and paste the following code into it:

server.cjs
const http = require("http");
const { parse } = require("url");
const next = require("next");

const port = parseInt(process.env.PORT || "3000", 10);
const app = next({ dev: false });
const handle = app.getRequestHandler();

app.prepare().then(() => {
  http.createServer((req, res) => {
    const parsedUrl = parse(req.url, true);
    handle(req, res, parsedUrl);
  }).listen(port, (err) => {
    if (err) throw err;
    console.log("> Ready on http://localhost:${port}");
  });
});
4

Create the deployment ZIP

Make a zip file that contains the following items from your project folder:

📦 StripCard_build.zip└─.next (build folder)├─.env (env variables)├─package.json ├─server.cjs
5

Upload & extract on the server

In your cPanel File Manager, navigate to the public_html folder, upload the zip file, then extract it.
6

Open Node.js App Manager

Go to cPanel → Setup Node.js App → click Create Application.
7

Configure the application

Fill out the form with the following values:

  • Node.js version:18.20.8 or higher
  • Application mode:Production
  • Application root:public_html
  • Application URL:your domain
  • Application startup file:server.cjs(full path)

Then click Create.

8

Run NPM Install

Inside the newly created app, click the Run NPM Install button and wait for it to complete.
9

Start the application

Click Run JS Script → select start → hit Run JS Script.
10

🎉 Your app is live!

Open your domain in a browser and you'll see StripCard up and running.
Steps