Files
nextjs-notion-starter-kit/lib/config.ts
Travis Fischer 768d0d5378 feat: minor fixes
2021-01-16 14:49:45 -05:00

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`
}