mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
26 lines
651 B
TypeScript
26 lines
651 B
TypeScript
/**
|
|
* All app config that should be available client-side.
|
|
*
|
|
* @see env.ts for server-side version.
|
|
*/
|
|
|
|
import { getEnv } from './get-env'
|
|
|
|
export const isDev =
|
|
process.env.NODE_ENV === 'development' || !process.env.NODE_ENV
|
|
|
|
export const fathomId = isDev ? null : getEnv('FATHOM_ID', null)
|
|
|
|
export const fathomConfig = fathomId
|
|
? {
|
|
excludedDomains: ['localhost', 'localhost:3000']
|
|
}
|
|
: undefined
|
|
|
|
// TODO: fix duplication between server-side env and client-side config
|
|
export const apiBaseUrl = `/api`
|
|
export const api = {
|
|
createPreviewImage: `${apiBaseUrl}/create-preview-image`,
|
|
searchNotion: `${apiBaseUrl}/search-notion`
|
|
}
|