Skip to main content

Deploying to Render

GeoLens is hosted on Render as two separate services:

ServiceTypeDomain
Main ApplicationWeb Servicegeo-lens.net
DocumentationStatic Sitedocs.geo-lens.net

Main Application (Web Service)​

Configuration​

SettingValue
EnvironmentNode
Build Commandnpm install
Start Commandnode server/server.js
PortAuto-detected from $PORT environment variable

Environment Variables​

Set all required environment variables in the Render dashboard under Environment. See Environment Variables for the full list.

For Firebase credentials in production, use FIREBASE_SERVICE_ACCOUNT_JSON (paste the entire service account JSON as a single-line string). Avoid using file paths in production.

Auto-Deploy​

Connect the Render service to the GitHub repository (UrbanDigitalTwin/Cesium_App). Render will automatically redeploy on every push to the configured branch (typically main).


Documentation Site (Static Site)​

Configuration​

SettingValue
Build Commandcd geo-lens-docs && npm install && npm run build
Publish Directorygeo-lens-docs/build

No environment variables are needed for the documentation site.

Custom Domain​

In the Render dashboard for the static site service:

  1. Go to Settings → Custom Domains
  2. Add docs.geo-lens.net
  3. Create a CNAME record at your DNS provider pointing docs → the Render-provided DNS name

Health Checks​

Render performs HTTP health checks on the web service. The default health check path is /. The Express server responds to this with index.html, which is sufficient.

Logs​

Access application logs from the Render dashboard under Logs. The server logs all incoming requests with timestamps, which aids in debugging API proxy failures.

Scaling​

The free tier of Render spins down the web service after 15 minutes of inactivity. The first request after spin-down takes ~30 seconds (cold start). For production workloads, upgrade to a paid plan with "Always On" enabled.