Update dependencies and logic in `server/db.ts` to use either the standard PostgreSQL driver or the Neon serverless driver based on the environment, along with configuration adjustments in `ecosystem.config.cjs`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/EAVbbe1
46 lines
3.0 KiB
Plaintext
46 lines
3.0 KiB
Plaintext
cat ecosystem.config.cjs
|
|
module.exports = {
|
|
apps: [{
|
|
name: 'vigilanza-turni',
|
|
script: 'npm',
|
|
args: 'start',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: 5000,
|
|
DATABASE_URL: 'postgresql://vigilanza_user:X8rWvmmeHbsUiKgSNr6dVOPBo@localhost:5432/vigilanza_turni?sslmode=disable',
|
|
DOMAIN: 'vt.alfacom.it',
|
|
SESSION_SECRET: 'abbaialacanadellacanna',
|
|
ISSUER_URL: 'https://replit.com/oidc'
|
|
}
|
|
}]
|
|
};
|
|
[root@localhost vigilanza-turni]# pm2 delete vigilanza-turni
|
|
[PM2] Applying action deleteProcessId on app [vigilanza-turni](ids: [ 0 ])
|
|
[PM2] [vigilanza-turni](0) ✓
|
|
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
|
|
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
|
|
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
|
|
[root@localhost vigilanza-turni]# pm2 start ecosystem.config.cjs
|
|
[PM2][WARN] Applications vigilanza-turni not running, starting...
|
|
[PM2] App [vigilanza-turni] launched (1 instances)
|
|
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
|
|
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
|
|
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
|
|
│ 0 │ vigilanza-turni │ fork │ 0 │ online │ 0% │ 6.4mb │
|
|
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
|
|
[root@localhost vigilanza-turni]# pm2 save
|
|
[PM2] Saving current process list...
|
|
[PM2] Successfully saved in /root/.pm2/dump.pm2
|
|
[root@localhost vigilanza-turni]# curl https://vt.alfacom.it/api/auto-login-admin
|
|
{"error":"Errore server","message":"Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:vt.alfacom.it"}[root@localhost vigilanza-turni]# cat .env
|
|
DATABASE_URL=postgresql://vigilanza_user:X8rWvmmeHbsUiKgSNr6dVOPBo@localhost:5432/vigilanza_turni?sslmode=disable
|
|
PGDATABASE=vigilanza_turni
|
|
PGUSER=vigilanza_user
|
|
PGPASSWORD=X8rWvmmeHbsUiKgSNr6dVOPBo
|
|
PGHOST=localhost
|
|
PGPORT=5432
|
|
SESSION_SECRET=abbaialacanadellacanna
|
|
NODE_ENV=production
|
|
PORT=5000
|
|
DOMAIN=vt.alfacom.it
|
|
ISSUER_URL=https://replit.com/oidc |