# Namecheap VPS / Dedicated Deployment

This project can run with the Namecheap Node.js VPS method.

## 1. Upload Files

Upload this project to a folder under your cPanel account, for example:

```bash
/home/CPANEL_USERNAME/webnew
```

Place the `.htaccess` file in the domain document root, usually:

```bash
/home/CPANEL_USERNAME/public_html/.htaccess
```

If the domain is an addon domain, use the document root shown in cPanel > Domains.

## 2. Start The Node App

SSH into the server as the cPanel user, then run:

```bash
cd /home/CPANEL_USERNAME/webnew
ADMIN_EMAIL="your@email.com" ADMIN_PASSWORD="yourStrongPassword" PORT=3000 npm start --production &
```

## 3. Better Production Run With PM2

PM2 keeps the site running after terminal close or app crash:

```bash
npm install -g pm2
cd /home/CPANEL_USERNAME/webnew
ADMIN_EMAIL="your@email.com" ADMIN_PASSWORD="yourStrongPassword" PORT=3000 pm2 start dev-server.js --name signalhgai
pm2 save
```

## 4. Apache Proxy

The `.htaccess` file proxies your domain to:

```bash
http://127.0.0.1:3000
```

If you use another port, update both the `PORT` command and `.htaccess`.

## 5. Check

Open:

```bash
https://yourdomain.com
https://yourdomain.com/admin
```

The admin panel and lead inbox require the Node server to be running.
