# cPanel Test Deployment

This project now includes the two files cPanel normally needs for a quick test deployment:

- `app.js` - default Passenger startup file for Node.js apps in cPanel.
- `.cpanel.yml` - Git deployment recipe for cPanel Git Version Control.

## Fastest way to get a test link

1. Upload this project to your cPanel account or connect it through cPanel Git Version Control.
2. In cPanel, create a Node.js app with:
   - Application root: `nodeapps/humacount-lis-test`
   - Application URL: your subdomain or test path
   - Application startup file: `app.js`
3. Set these environment variables in the cPanel app:
   - `NODE_ENV=production`
   - `DISABLE_SERIAL_LISTENER=true`
   - `SERVER_HOST=0.0.0.0`
4. Run `npm install` in the application root.
5. Restart the app.
6. Open the Application URL shown by cPanel and click `Inject Test Result`.

## If you use cPanel Git deployment

- The checked-in `.cpanel.yml` deploys the app into `$HOME/nodeapps/humacount-lis-test`.
- If you want a different deployment folder, edit the `APP_ROOT` value in `.cpanel.yml`.
- After deployment, create the Node.js app in cPanel and point the Application Root to the same folder.

## Notes

- `DISABLE_SERIAL_LISTENER=true` is important for hosted testing because the cPanel server will not have the HumaCount machine attached.
- The dashboard still works in demo mode and can generate sample output with the `Inject Test Result` button.
- To reload changes on cPanel Passenger, restart the app or touch `tmp/restart.txt`.
