# Job83 UAT API deployment

Use this package only for `api-uat.job83.org`.

1. Extract the archive to a private cPanel application directory.
2. Create a cPanel Node.js application with Node.js 20 or 22.
3. Set the application root to the extracted directory.
4. Set the startup file to `dist/server.js`.
5. Copy `.env.uat.example` to a secure environment configuration and replace every placeholder.
6. Confirm the database name contains `uat` before running any database command.
7. Install, generate, migrate, and start:

```bash
npm ci
npm run prisma:generate
npm exec prisma migrate deploy
```

Restart the cPanel Node.js application, then verify:

```text
https://api-uat.job83.org/api/health
https://api-uat.job83.org/robots.txt
```

Expected health response:

```json
{"status":"ok","app":"Job83 API"}
```

Expected UAT robots response:

```text
User-agent: *
Disallow: /
```

Never run `npm run db:seed` in UAT. Create the UAT administrator with the one-time bootstrap token, then remove `ADMIN_BOOTSTRAP_TOKEN` from the runtime and restart the application.
