How to use the dotenv._getKeysAndValuesFromEnvFilePath function in dotenv

To help you get started, we’ve selected a few dotenv 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 creynders / konfy / lib / node.js View on Github external
function doLoadEnv(opts){
    if( !process.env.NODE_ENV ){
        process.env.NODE_ENV = "development";
    }
    dotenv._getKeysAndValuesFromEnvFilePath( opts.dotenvFile );
    dotenv._getKeysAndValuesFromEnvFilePath( opts.dotenvFile + "." + process.env.NODE_ENV );
    process.env.ENV_LOADED = process.env.NODE_ENV;
    dotenv._setEnvs();
    console.log( "[Konfy] loaded env variables for '" + process.env.NODE_ENV + "'" );
}
github creynders / konfy / lib / node.js View on Github external
function doLoadEnv(opts){
    if( !process.env.NODE_ENV ){
        process.env.NODE_ENV = "development";
    }
    dotenv._getKeysAndValuesFromEnvFilePath( opts.dotenvFile );
    dotenv._getKeysAndValuesFromEnvFilePath( opts.dotenvFile + "." + process.env.NODE_ENV );
    process.env.ENV_LOADED = process.env.NODE_ENV;
    dotenv._setEnvs();
    console.log( "[Konfy] loaded env variables for '" + process.env.NODE_ENV + "'" );
}
github adafruit / Adafruit-Occidentalis / packages / adafruit-io-gif / etc / adafruit-io-gif / node_source / index.js View on Github external
#!/usr/bin/env node

var gif = require('aio_gif'),
    dotenv = require('dotenv'),
    path = require('path')
    spawn = require('child_process').spawn;

var config = path.join(__dirname, '..', 'server.conf');

dotenv._getKeysAndValuesFromEnvFilePath(config);
dotenv._setEnvs();

var server = gif({
  key: process.env.AIO_KEY.trim(),
  feed: process.env.AIO_FEED.trim(),
  port: process.env.HTTP_PORT
});

console.log('Starting HTTP server on http://localhost:%d', process.env.HTTP_PORT);

server.on('error', console.error.bind(this, 'GIF Server Error'));

server.on('image', function() {
  spawn('/usr/bin/aio_gif', ['refresh']);
});
github tofuness / anistack / scrape / scrapeManga.js View on Github external
var dotenv = require('dotenv');
dotenv._getKeysAndValuesFromEnvFilePath('../.env');
dotenv._setEnvs();

var async = require('async');
var request = require('request');
var _ = require('lodash');
var bar = require('progress-bar').create(process.stdout);

var db = require('../models/db.js');
var Manga = db.Manga;

var fs = require('fs');
var errorLog = fs.WriteStream('./logs/scrapeManga-' + new Date().getTime() + '.log');

var getQ = async.queue(function(task, callback) {
	request(task.url, function(err, res, body) {
		if (err || res.statusCode === 404) {
github tofuness / anistack / scrape / scrapeAnime.js View on Github external
var dotenv = require('dotenv');
dotenv._getKeysAndValuesFromEnvFilePath('../.env');
dotenv._setEnvs();

var async = require('async');
var request = require('request');
var _ = require('lodash');
var bar = require('progress-bar').create(process.stdout);

var db = require('../models/db.js');
var Anime = db.Anime;

var fs = require('fs');
var errorLog = fs.WriteStream('./logs/scrapeAnime-' + new Date().getTime() + '.log');

var getQ = async.queue(function(task, callback) {
	request(task.url, function(err, res, body) {
		if (err || res.statusCode === 404) {
github busterc / assert-dotenv / index.js View on Github external
function loadAndAssert(options, callback) {
    dotenv._getKeysAndValuesFromEnvFilePath(options.dotenvFile);
    dotenv._setEnvs();
    dotenvAssert(options.dotenvAssertOptions, callback);
  }
github tofuness / anistack / scrape / updateAnime.js View on Github external
var dotenv = require('dotenv');
dotenv._getKeysAndValuesFromEnvFilePath('../.env');
dotenv._setEnvs();

var async = require('async');
var request = require('request');
var _ = require('lodash');
var bar = require('progress-bar').create(process.stdout);

var db = require('../models/db.js');
var Anime = db.Anime;

var fs = require('fs');
//var errorLog = fs.WriteStream('./logs/updateAnime-' + new Date().getTime() + '.log');

var getQ = async.queue(function(task, callback) {
	request(task.url, function(err, res, body) {
		if (err || res.statusCode === 404) {

dotenv

Loads environment variables from .env file

BSD-2-Clause
Latest version published 9 months ago

Package Health Score

87 / 100
Full package analysis