Files
netris-nestri/packages/play-standalone/astro.config.mjs
Kristian Ollikainen 5705029972 feat(play-standalone): Add PEER_URL env variable (#302)
## Description

Adds PEER_URL env variable for setting peer URL (query param still takes
priority if set).

- Useful for self-hosters
- Was a pain to figure out



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Support configuring the peer server URL via an environment variable,
with automatic fallback to the URL parameter or a default.
- Server-provided configuration is securely passed to the client to
simplify deployment setup.

- Chores
- Excluded common build artifacts and IDE directories from container
contexts to reduce image size and speed up builds.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
2025-09-24 20:08:20 +03:00

20 lines
415 B
JavaScript

// @ts-check
import { defineConfig, envField } from "astro/config";
import node from "@astrojs/node";
// https://astro.build/config
export default defineConfig({
adapter: node({
mode: 'standalone',
}),
output: "server",
server: {
"host": "0.0.0.0",
"port": 3000,
},
env: {
schema: {
PEER_URL: envField.string({ context: "server", access: "secret", optional: true }),
}
}
});