Fixes that block or weaken a real deployment. Nothing here changes the rendered pages. Bind the lead API to loopback. Each server called app.listen() without a host, so it bound 0.0.0.0. Combined with a blanket `trust proxy: true` — which makes Express take the leftmost X-Forwarded-For entry as req.ip — the in-memory lead rate limiter was spoofable by anyone who could reach the port directly. HOST now defaults to 127.0.0.1 and trust is narrowed to 'loopback', so a request arriving from anywhere but the local proxy has its forged header ignored. Give each landing its own port. All four .env files claimed PORT=3000, and fitnes/.env.example collided with medcenter/.env.example, so three of the four could never have started on one host. Now 3000/3001/3002/3003 consistently across the code defaults, the env templates and the vite dev proxies, so all four also run side by side locally. Template the JSON-LD url. canonical and og:url already resolved from %VITE_SITE_URL%, but the JSON-LD block hardcoded an exodevices.ru sub-path that would not follow the environment. All four now read from the same variable. Declare the Node version. Nothing stated it, yet transitive deps impose a >=22.12 floor (@rolldown/binding, yargs, concurrently). Added engines and .nvmrc so a too-old runtime fails clearly. Typechecked and production-built on all four; verified the socket binds 127.0.0.1 only, health reports amo:true, the site still boots with the CRM unconfigured, and the limiter returns 429 with Retry-After on the ninth request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
1.1 KiB
JSON
41 lines
1.1 KiB
JSON
{
|
|
"name": "exo-hotel-landing",
|
|
"private": true,
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=22.12"
|
|
},
|
|
"scripts": {
|
|
"dev": "concurrently -n client,server -c cyan,magenta \"vite\" \"tsx watch server/src/index.ts\"",
|
|
"dev:client": "vite",
|
|
"dev:server": "tsx watch server/src/index.ts",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview",
|
|
"start": "NODE_ENV=production tsx server/src/index.ts",
|
|
"typecheck": "tsc -b --force",
|
|
"amo:check": "tsx scripts/amo-check.ts"
|
|
},
|
|
"dependencies": {
|
|
"@fontsource-variable/inter": "^5.3.0",
|
|
"dotenv": "^17.4.2",
|
|
"express": "^5.2.1",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"tsx": "^4.23.12",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^26.4.0",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.5",
|
|
"@vitejs/plugin-react": "^6.1.1",
|
|
"concurrently": "^10.0.5",
|
|
"tailwindcss": "^4.3.3",
|
|
"typescript": "^7.0.2",
|
|
"vite": "^8.2.2"
|
|
}
|
|
}
|