Deploying a Node.js application no longer requires managing complex bare-metal Linux servers. With Ovation Hall’s cloud hosting infrastructure, you can deploy Express.js, NestJS, and Node backend microservices directly from your cPanel dashboard.
Here is the complete walkthrough.
Step 1: Package Your Node.js Project
Before uploading files to your server:
1. Ensure your project contains a clean package.json file with your dependencies specified.
2. Verify that your entry file (typically app.js or server.js) listens on the environment port:
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
app.get('/', (req, res) => {
res.json({ status: 'Online', server: 'Ovation Hall Cloud' });
});
app.listen(PORT, () => {
console.log(`Server listening on port ${PORT}`);
});3. Do NOT upload node_modules! Compress only your source code, package.json, and configuration files into a .zip archive.
Step 2: Create the Node.js App in cPanel
1. Log in to your Ovation Hall cPanel.
2. Under the Software section, click Setup Node.js App.
3. Click Create Application.
4. Configure the settings:
- Node.js version: Choose the LTS version (e.g., Node 20.x or 22.x).
- Application mode: Select
Production. - Application root: The folder where your code will live (e.g.,
nodejs_api). - Application URL: The domain or subdomain routing to this app (e.g.,
api.yourdomain.com). - Application startup file:
app.jsorserver.js.
5. Click Create.
Step 3: Upload Code and Install Dependencies
1. Open File Manager and navigate to your application root folder (nodejs_api).
2. Upload and extract your project zip file.
3. Return to Setup Node.js App in cPanel and click on your application.
4. Under the NPM Packages section, click Run NPM Install.
5. Once installation finishes, click Restart Application.
6. Visit your application URL. Your Node.js API is now live with automated process management and SSL termination!
Related Topics
Ready to Host with High-Speed LiteSpeed?
Get your website online in Ghana today. Fast NVMe SSD storage, free automated SSL, 99.9% uptime, and direct Mobile Money billing.