How to use the dotenv-extended.config function in dotenv-extended

To help you get started, we’ve selected a few dotenv-extended examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drupal-graphql / drupal-decoupled-app / internals / scripts / dropDatabase.js View on Github external
/**
 * @file    database drop script.
 * @author  Sebastian Siemssen 
 * @date    2016-06-21
 */

import mongoose from 'mongoose';

// Load the environment configuration.
require('dotenv-extended').config({
  path     : '.env.local',
  defaults : '.env',
});

// Use promises for mongoose async operations.
mongoose.Promise = Promise;

/**
 * drop database
 *
 * @desc   main entry point for this script
 * @return {null}
 */
const dropDatabase = () => {
  console.log('Starting to drop the entire database.');
github drupal-graphql / drupal-decoupled-app / internals / webpack / webpack.prod.js View on Github external
/**
 * @file    production webpack config
 * @author  Sebastian Siemssen 
 * @date    2016-01-01
 */

/* eslint-disable global-require */

// Load the environment configuration.
require('dotenv-extended').config(
  {
    path      : '.env.local',
    defaults  : '.env',
  }
);

const path              = require('path');
const webpack           = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const OfflinePlugin     = require('offline-plugin');
const WebpackMd5Hash    = require('webpack-md5-hash');
const gitRevSync        = require('git-rev-sync');

module.exports = [require('./webpack.base')({
  // In production, we skip all hot-reloading stuff.
github drupal-graphql / drupal-decoupled-app / server / index.js View on Github external
/**
 * @file    node express server
 * @author  Sebastian Siemssen 
 * @date    2016-01-01
 */

/* eslint-disable global-require */
/* eslint-disable consistent-return */

// Load the polyfill so we can use things like Object.values().
import 'babel-polyfill';

// Load the environment configuration.
require('dotenv-extended').config({
  path     : '.env.local',
  defaults : '.env',
});

// Fix error "Warning: Possible EventEmitter memory leak detected.".
require('events').EventEmitter.prototype._maxListeners = 200; // eslint-disable-line no-underscore-dangle

import compression from 'compression';
import express from 'express';
import graphql from 'express-graphql';
import mongoose from 'mongoose';
import schema from './schema';

// Use promises for mongoose async operations.
mongoose.Promise = Promise;
github drupal-graphql / drupal-decoupled-app / internals / webpack / webpack.dev.js View on Github external
/**
 * @file    develop webpack config
 * @author  Sebastian Siemssen 
 * @date    2016-01-01
 */

/* eslint-disable global-require */

// Load the environment configuration.
require('dotenv-extended').config(
  {
    path      : '.env.local',
    defaults  : '.env',
  }
);

const fs                = require('fs');
const path              = require('path');
const webpack           = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const dependencyHandlers = () => {

  const dllPath = path.resolve(process.cwd(), 'dlls');
  const manifestPath = path.resolve(dllPath, 'dependencies.json');

dotenv-extended

A module for loading .env files and optionally loading defaults and a schema for validating all values are present.

MIT
Latest version published 4 years ago

Package Health Score

59 / 100
Full package analysis

Popular dotenv-extended functions