Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Add template for TypeScript environment variables #24

Open
keonik opened this issue Aug 3, 2021 · 0 comments
Open

Add template for TypeScript environment variables #24

keonik opened this issue Aug 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@keonik
Copy link
Collaborator

keonik commented Aug 3, 2021

I forsee others will run into a similar extension of environment variables. This would be good to add a types.d.ts file to make this extension easier

Example

import { PrismaClient } from './lib/prisma';
import { Client as MinioClient } from 'minio';

declare global {
    namespace NodeJS {
        interface ProcessEnv {
            NODE_ENV: 'development' | 'production';
            PORT?: string;
            DATABASE_URL: string;
            ENVIRONMENT: 'prod' | 'edge' | 'uat';
            MINIO_SECRET: string;
            MINIO_ACCESS: string;
            MINIO_ENDPOINT: string;
            MINIO_SSL: string;
            GOOGLE_ANALYTICS_ID: string;
            NEXTAUTH_URL: string;
        }
    }
}

export {};
@keonik keonik added the enhancement New feature or request label Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant