1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2026-03-22 22:22:29 +00:00

found a better config setup I like

This commit is contained in:
Bowden
2018-01-04 16:29:01 -08:00
parent 7974d20503
commit d822f12121
5 changed files with 6 additions and 28 deletions

View File

@@ -1,7 +1,10 @@
// import log from './logger'; TODO
import * as dotenv from "dotenv";
export const ENVIRONMENT = process.env.NODE_ENV;
const prod = ENVIRONMENT === "production";
const prod = ENVIRONMENT === "production"; // Anything else is treated as 'dev'
dotenv.config({ path: ".env.example" });
export const SESSION_SECRET = process.env["SESSION_SECRET"];
export const MONGODB_URI = prod ? process.env["MONGODB_URI"] : process.env["MONGODB_URI_LOCAL"];