Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
* @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));
'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);
'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);
#!/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')))
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
'use strict'
const merge = require('webpack-merge')
const dotenv = require('dotenv-safe').load()
module.exports = merge(dotenv.parsed, {
NODE_ENV: '"production"'
})