How to use the dotenv-safe.load function in dotenv-safe

To help you get started, we’ve selected a few dotenv-safe 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 zhuowenli / zhuowenli.github.io / app / app.js View on Github external
/*
* @Author: 卓文理
* @Email : 531840344@qq.com
* @Desc  : 主入口
*/
'use strict';

// env
require('dotenv-safe').load();

// koa
const koa = require('koa');
const lodash = require('lodash');
const onerror = require('koa-onerror');
const favicon = require('koa-favicon');
const session = require('koa-session');
const logger = require('./services/logger');
const compose = require('./utils/mw-compose');
const ResponseData = require('./lib/response-data');

// init app, whit proxy
const app = koa();
app.proxy = true;

app.use(session(app));
github rolodato / gitlab-letsencrypt / test / jekyll.js View on Github external
'use strict';

require('dotenv-safe').load();

const options = {
    staging: true,
    jekyll: true,
    path: '/',
    domain: process.env.GITLAB_LE_JEKYLL_DOMAIN.split(','),
    repository: process.env.GITLAB_LE_JEKYLL_REPOSITORY,
    token: process.env.GITLAB_LE_JEKYLL_TOKEN,
    email: process.env.GITLAB_LE_EMAIL
};

require('../main')(options);
github rolodato / gitlab-letsencrypt / test / index.js View on Github external
'use strict';

require('dotenv-safe').load();

const options = {
    staging: true,
    path: '/public/.well-known/acme-challenge',
    domain: process.env.GITLAB_LE_DOMAIN.split(','),
    repository: process.env.GITLAB_LE_REPOSITORY,
    token: process.env.GITLAB_LE_TOKEN,
    email: process.env.GITLAB_LE_EMAIL
};

require('../main')(options);
github nodejs / i18n / script / status.js View on Github external
#!/usr/bin/env node

const fs = require('fs')
const path = require('path')
const request = require('request')
require('dotenv-safe').load()

const projectKey = process.env.CROWDIN_KEY

const url = `https://api.crowdin.com/api/project/nodejs/status?key=${projectKey}&json`

request.post(url)
  .on('error', err => console.error(err))
  .pipe(fs.createWriteStream(path.join(__dirname, '../stats.json')))
github electron / apps / lib / github.js View on Github external
if (!process.env.GH_TOKEN) {
  require('dotenv-safe').load()
}

const Github = require('@octokit/rest')
const github = new Github({

})

github.authenticate({
  type: 'token',
  token: process.env.GH_TOKEN
})

module.exports = github
github sayhicoelho / vue-firebase / config / prod.env.js View on Github external
'use strict'
const merge = require('webpack-merge')
const dotenv = require('dotenv-safe').load()

module.exports = merge(dotenv.parsed, {
  NODE_ENV: '"production"'
})

dotenv-safe

Load environment variables from .env and ensure they are defined

MIT
Latest version published 9 months ago

Package Health Score

72 / 100
Full package analysis

Popular dotenv-safe functions