# Deployment Options for Gods Eye View: 4 Proven Methods Explained

> Explore 4 deployment options for Gods Eye View. Deploy as static files with Vite on any static host, CDN, container, or web server. No server runtime needed.

- Repository: [Bilawal Sidhu/gods-eye-view](https://github.com/bilawalsidhu/gods-eye-view)
- Tags: deployment-options
- Published: 2026-09-05

---

**Gods eye view deploys as static files generated by Vite, making it compatible with any static hosting service, CDN, container platform, or traditional web server without requiring server-side runtime.**

The gods eye view application is a client-side web interface built with Vite, Cesium JS, and the Google Maps 3D Tiles SDK. Because `npm run build` produces a self-contained bundle of HTML, JavaScript, and CSS assets in the `dist/` directory, you can serve it using any infrastructure that delivers static content. This guide covers the four primary deployment patterns found in the repository, along with security considerations for production environments.

## Static Site Hosting (GitHub Pages, Netlify, Vercel)

The simplest deployment path uses any CDN-backed static-site platform. The build pipeline defined in [`package.json`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/package.json) generates a production-ready bundle that requires no server-side processing.

To deploy on Netlify, Vercel, Cloudflare Pages, or GitHub Pages:

1. Connect your repository to the hosting provider
2. Set the build command to `npm run build`
3. Configure the publish directory as `dist`

The [`vite.config.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/vite.config.js) file controls the base public path for production. If you are deploying to a subdirectory rather than a domain root, update the `base` option in this configuration file before building.

## Node.js and Express Server Deployment

For environments requiring API key proxying or custom middleware, wrap the static assets in a lightweight Node.js server. The repository includes a helper script at [`pinokio/pinokio.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/pinokio/pinokio.js) that demonstrates launching a server to serve the `dist/` folder.

Create a minimal Express server to serve the build output:

```javascript
const express = require('express');
const path = require('path');
const app = express();

app.use(express.static('dist'));
app.get('*', (req, res) => {
  res.sendFile(path.resolve(__dirname, 'dist', 'index.html'));
});

app.listen(3000);

```

This approach is useful when you need to hide API keys from the client or implement caching for external data sources like Launch Library 2 and Open-Meteo.

## Docker Container Deployment

Containerize the application using a multi-stage build that compiles the Vite project and serves it via Nginx. While the repository does not currently include a `Dockerfile`, the standard pattern leverages the existing build scripts.

```dockerfile

# Stage 1 – build

FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
RUN npm ci && npm run build

# Stage 2 – serve

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

```

Build and run the container:

```bash
docker build -t gods-eye-view .
docker run -p 8080:80 gods-eye-view

```

This method works on Docker Desktop, Kubernetes clusters, AWS ECS, and Google Cloud Run.

## Edge Runtimes and Serverless Platforms

Deploy the `dist/` directory directly to serverless edge platforms like Cloudflare Workers, Netlify Edge Functions, or Vercel Edge Network. Since gods eye view is purely client-side, these platforms can serve the static assets from global edge locations with minimal configuration.

No additional code is required; simply upload the `dist/` folder after running the build command. The platform handles HTTPS, caching headers, and global distribution automatically.

## Traditional Web Server Deployment (Apache, Nginx)

Place the contents of the `dist/` directory into your web server's document root. For single-page application routing, configure the server to fallback to [`index.html`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/index.html) when a requested file does not exist.

**Nginx configuration example:**

```nginx
server {
    listen 80;
    root /var/www/html;
    
    location / {
        try_files $uri $uri/ /index.html;
    }
}

```

**Apache configuration example:**

```apache
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
</IfModule>

```

## Security and Configuration Considerations

**API Key Management:** The application requires a **Google Maps API key** and optionally a **Cesium ion token**. According to [`SECURITY.md`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/SECURITY.md), these credentials are injected client-side. For public deployments, restrict the Google key to specific HTTP referrers and limit the Cesium token to `assets:read` with URL restrictions.

**CORS and Rate Limiting:** Data sources such as Launch Library 2 and Open-Meteo are accessed directly from the browser as documented in [`DATA_SOURCES.md`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/DATA_SOURCES.md). If you deploy behind a Node.js proxy server, you can cache responses to avoid hitting public rate limits.

**Performance Optimization:** The Vite build process already includes code-splitting and minification. For high-traffic deployments, enable HTTP/2 or HTTP/3 on your host and ensure static assets are cached aggressively at the CDN edge.

## Summary

- **Static hosting** is the fastest path to production using the `dist/` output from `npm run build`
- **Node.js servers** provide flexibility for API key proxying and middleware, with [`pinokio/pinokio.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/pinokio/pinokio.js) available as a reference implementation
- **Docker containers** package the Nginx-served static assets for orchestrated environments like Kubernetes
- **Edge runtimes** offer global distribution without configuration overhead
- All deployments require securing API keys according to [`SECURITY.md`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/SECURITY.md) and handling client-side routing for single-page application navigation

## Frequently Asked Questions

### Does gods eye view require a backend server?

No. Gods eye view is a purely client-side application that runs entirely in the browser. You can deploy it to any static hosting service that serves HTML and JavaScript files. A backend server is only necessary if you want to proxy API requests to protect keys or cache external data sources.

### How do I configure the base path for subdirectory deployments?

Edit the `base` option in [`vite.config.js`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/vite.config.js) before running `npm run build`. Set the value to your subdirectory path (for example, `base: '/gods-eye-view/'`) to ensure asset URLs resolve correctly when the application is not hosted at the domain root.

### What API keys are required for production deployment?

You need a **Google Maps API key** with the 3D Tiles API enabled, and optionally a **Cesium ion token** for enhanced terrain and imagery. Store these in environment variables during build time or inject them at runtime, and follow the restriction guidelines in [`SECURITY.md`](https://github.com/bilawalsidhu/gods-eye-view/blob/main/SECURITY.md) to prevent unauthorized usage.

### Can I run gods eye view locally without building?

Yes. The repository includes a development server configuration through Vite. Run `npm run dev` to start the local development server with hot module replacement. For testing the production build locally, use `node pinokio/pinokio.js` or any static file server pointed at the `dist/` directory.