ci / check (push) Successful in 55s
- add /cool, /cool?vote=1, /cool/stage and /cool/city on the existing Nuxt/Onyx stack - wire real route/shade metrics and OSM geometry from the route bundle; city-gap data for the city view - show shade % and direct-sun minutes together; recommend Accessible for Ruth with the 15% ramp trade-off - add in-memory time/scene/round state and one anonymous vote per session, polled every 2 s - keep the retail module linked but out of the Cool City story
54 lines
2.0 KiB
TypeScript
54 lines
2.0 KiB
TypeScript
const useMock =
|
|
(process.env.NUXT_PUBLIC_USE_MOCK ?? process.env.NUXT_USE_MOCK ?? '').toLowerCase() === 'true' ||
|
|
process.env.NUXT_PUBLIC_USE_MOCK === '1' ||
|
|
process.env.NUXT_USE_MOCK === '1'
|
|
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: '2026-11-01',
|
|
ssr: true,
|
|
modules: ['@sit-onyx/nuxt'],
|
|
css: ['~/assets/css/main.css', '~/assets/css/cool.css'],
|
|
devtools: { enabled: false },
|
|
runtimeConfig: {
|
|
// Server-side Go API. K8s sets NUXT_API_INTERNAL_BASE=http://api:8080.
|
|
apiBase:
|
|
process.env.NUXT_API_INTERNAL_BASE ??
|
|
process.env.NUXT_API_BASE ??
|
|
process.env.NUXT_PUBLIC_API_BASE ??
|
|
'http://localhost:8080',
|
|
apiTimeoutMs: Number(process.env.NUXT_API_TIMEOUT_MS ?? 8000),
|
|
// Explicit dev fallback. The default is the real Go API.
|
|
useMock,
|
|
// Server-only control credentials for POST /api/scenario and /api/train.
|
|
controlUser: process.env.CONTROL_USER ?? process.env.NUXT_CONTROL_USER ?? '',
|
|
controlPass: process.env.CONTROL_PASS ?? process.env.NUXT_CONTROL_PASS ?? '',
|
|
controlToken: process.env.CONTROL_TOKEN ?? process.env.NUXT_CONTROL_TOKEN ?? '',
|
|
public: {
|
|
// Browser never calls Go directly; this is for display/future SSE wiring.
|
|
apiBase: process.env.NUXT_PUBLIC_API_BASE ?? '',
|
|
useMock,
|
|
demoNow: process.env.NUXT_PUBLIC_DEMO_NOW ?? '2026-11-14T08:12:00Z',
|
|
},
|
|
},
|
|
app: {
|
|
head: {
|
|
htmlAttrs: { lang: 'en' },
|
|
title: 'PulseCast — footfall to shifts',
|
|
meta: [
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' },
|
|
{
|
|
name: 'description',
|
|
content:
|
|
'PulseCast turns inner-city footfall into a transparent staffing plan for Heilbronn retailers: the peak shift, the week cost, coverage and the assumptions behind them.',
|
|
},
|
|
{ name: 'theme-color', content: '#f4efe6' },
|
|
],
|
|
link: [{ rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
|
|
},
|
|
},
|
|
nitro: {
|
|
preset: 'node-server',
|
|
compressPublicAssets: true,
|
|
},
|
|
})
|