mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-01-09 13:36:47 -06:00
20 lines
537 B
TypeScript
20 lines
537 B
TypeScript
import * as dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
export const deFaultValues = {
|
|
ENV: 'production',
|
|
GRAPHIQL: 'false',
|
|
PLAYGROUND_GRAPHQL: 'false',
|
|
WHITELIST_URLS: 'http://localhost',
|
|
PORT: 4000,
|
|
};
|
|
|
|
export const config = {
|
|
ENV: process.env.ENV,
|
|
GRAPHIQL: process.env.GRAPHIQL === 'true' ? true : false,
|
|
PLAYGROUND_GRAPHQL: process.env.PLAYGROUND_GRAPHQL === 'true' ? true : false,
|
|
WHITELIST_URLS: process.env.WHITELIST_URLS ? process.env.WHITELIST_URLS.split(',') : deFaultValues.WHITELIST_URLS,
|
|
PORT: process.env.PORT,
|
|
};
|