mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Type-safe environemnt variables
This commit is contained in:
parent
255945fc68
commit
4ee8a9583e
1 changed files with 15 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// @ts-check
|
||||
import { defineConfig } from 'astro/config'
|
||||
import { defineConfig, envField } from 'astro/config'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import node from '@astrojs/node'
|
||||
import react from '@astrojs/react'
|
||||
|
|
@ -10,6 +10,20 @@ import { languageTags } from './project.inlang/settings.json'
|
|||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
env: {
|
||||
schema: {
|
||||
MAILSERVER: envField.string({ context: 'server', access: 'secret' }),
|
||||
BETTER_AUTH_SECRET: envField.string({ context: 'server', access: 'secret' }),
|
||||
DATABASE_URL: envField.string({ context: 'server', access: 'secret' }),
|
||||
BETTER_AUTH_URL: envField.string({
|
||||
context: 'server',
|
||||
access: 'public',
|
||||
optional: true,
|
||||
default: 'http://localhost:4321'
|
||||
})
|
||||
},
|
||||
validateSecrets: true
|
||||
},
|
||||
site: 'https://sittingonclouds.net',
|
||||
i18n: {
|
||||
locales: languageTags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue