Deploying to Render
GeoLens is hosted on Render as two separate services:
| Service | Type | Domain |
|---|---|---|
| Main Application | Web Service | geo-lens.net |
| Documentation | Static Site | docs.geo-lens.net |
Main Application (Web Service)
Configuration
| Setting | Value |
|---|---|
| Environment | Node |
| Build Command | npm install |
| Start Command | node server/server.js |
| Port | Auto-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
| Setting | Value |
|---|---|
| Build Command | cd geo-lens-docs && npm install && npm run build |
| Publish Directory | geo-lens-docs/build |
No environment variables are needed for the documentation site.
Custom Domain
In the Render dashboard for the static site service:
- Go to Settings → Custom Domains
- Add
docs.geo-lens.net - Create a
CNAMErecord at your DNS provider pointingdocs→ 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.