feat: initial webapp structure from notion2site

This commit is contained in:
Travis Fischer
2021-01-15 11:31:09 -05:00
parent 253400fba9
commit 5765d3f5bc
47 changed files with 1894 additions and 68 deletions

17
lib/get-env.ts Normal file
View File

@@ -0,0 +1,17 @@
export function getEnv(
key: string,
defaultValue?: string,
env = process.env
): string {
const value = env[key]
if (value !== undefined) {
return value
}
if (defaultValue !== undefined) {
return defaultValue
}
throw new Error(`Config error: missing required env var "${key}"`)
}