# SSR Server Deployment

## Running the Production Server

The Astro site is now configured for Server-Side Rendering (SSR) with the Node.js adapter in standalone mode.

### Build & Run

```bash
# Build the SSR server
npm run build

# Run the standalone server
node dist/server/entry.mjs
```

### Configuration

- **Output Mode**: `server` (SSR enabled)
- **Adapter**: `@astrojs/node` (v8.3.4)
- **Mode**: `standalone` (includes built-in HTTP server)
- **Default Port**: 4321 (configurable via PORT environment variable)

### Environment Variables

```bash
# Set custom port
PORT=3000 node dist/server/entry.mjs

# Set host
HOST=0.0.0.0 PORT=3000 node dist/server/entry.mjs
```

### Deployment Options

- **Docker**: Use the standalone server in a Node.js container
- **PM2**: Process manager for production
- **Cloud Platforms**: Vercel, Netlify, AWS, Google Cloud, etc.

### File Structure

```
dist/
├── client/          # Static assets (CSS, JS, images)
└── server/          # SSR server code
    ├── entry.mjs    # Main server entry point
    ├── pages/       # Compiled page components
    └── chunks/      # Code-split modules
```
