diff --git a/.github/workflows/cpanel_deploy.yml b/.github/workflows/cpanel_deploy.yml index 41d13e1..c32aaff 100644 --- a/.github/workflows/cpanel_deploy.yml +++ b/.github/workflows/cpanel_deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: npm cache-dependency-path: | package-lock.json diff --git a/backend/README.md b/backend/README.md index dc8b43c..f865a6c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -26,6 +26,8 @@ The schema enables RLS on submissions, users, and follow-up notes without granti ## 2. Local Development +Use Node.js 22 or newer, as required by the Supabase client runtime. + 1. Navigate to the backend directory: ```bash cd backend @@ -65,7 +67,7 @@ The schema enables RLS on submissions, users, and follow-up notes without granti 4. Set the following configuration: - **Name**: `hgbc-firsttimer-api` - **Root Directory**: `backend` (if in monorepo) or leave blank if deployed from separate repo. - - **Environment**: `Node` + - **Environment**: `Node` (Node.js 22 or newer; enforced by `package.json`) - **Build Command**: `npm install` - **Start Command**: `npm start` - **Health Check Path**: `/api/health` diff --git a/backend/package-lock.json b/backend/package-lock.json index edadbea..9d3558f 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -18,6 +18,9 @@ "json2csv": "^6.0.0-alpha.2", "jsonwebtoken": "^9.0.2", "zod": "^3.24.2" + }, + "engines": { + "node": ">=22" } }, "node_modules/@streamparser/json": { diff --git a/backend/package.json b/backend/package.json index efb03c5..d9d224d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -4,6 +4,9 @@ "description": "Node.js + Supabase Backend API for HGBC First Timer and Guest Management Portal", "main": "server.js", "type": "module", + "engines": { + "node": ">=22" + }, "scripts": { "start": "node server.js", "dev": "node --watch server.js",