cPanel — Main Domain
Deploy StripCard on your primary domain (example: https://yourdomain.com)
Install project dependencies
Open the project folder on your terminal and run the install command.
npm installBuild the project
Once the install is complete, create a production build of the app.
npm run buildCreate the server.cjs file
In the root of your project, create a new file named server.cjs and paste the following code into it:
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}");
});
});Create the deployment ZIP
Make a zip file that contains the following items from your project folder:
Upload & extract on the server
Open Node.js App Manager
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.