create-node-ts-graphql-server/config/index.ts
Alejandro Lembke Barrientos b55b0f61a9 PR-448199:
Adding files from first version.
Creating GraphQL server with their controllers and their models, squema and resolvers.
Adding support to webpack and typescript.
2022-05-25 21:08:50 +00:00

12 lines
351 B
TypeScript

import * as dotenv from 'dotenv';
dotenv.config();
export const config = {
env: process.env.ENVIRONMENT ? process.env.ENVIRONMENT : 'production',
graphiQL: process.env.GRAPHIQL === 'true' ? true : false,
whiteList: process.env.WHITELIST_URLS ? process.env.WHITELIST_URLS.split(',') : [
'http://localhost'
],
port: process.env.PORT || 4000,
};