Files
nextjs-notion-starter-kit/lib/config.ts
Travis Fischer b57d7651ba feat: search
2021-01-16 10:25:20 -05:00

26 lines
655 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: address 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`
}