<commit_before>/**
 * Created by kzaY on 07/09/2017.
 */
import passport = require('passport');
import discord = require('passport-discord');

// just some test model
let User = {
    findOrCreate(discordId: any, callback: (err: any, user: any) => void): void {
        callback(null, { username: 'james' });
    }
};

passport.use(new discord.Strategy(
    {
        clientID: 'id',
        clientSecret: 'secret',
        callbackURL: 'callbackURL'
    },
    (accessToken: string, refreshToken: string, profile: any, cb: any) => {
        User.findOrCreate({ discordId: profile.id }, (err, user) => {
            return cb(err, user);
        });<commit_msg>change to process envv var<commit_after>/**
 * Created by kzaY on 07/09/2017.
 */
import passport = require('passport');
import discord = require('passport-discord');

// just some test model
let User = {
    findOrCreate(discordId: any, callback: (err: any, user: any) => void): void {
        callback(null, { username: 'james' });
    }
};

passport.use(new discord.Strategy(
    {
        clientID: process.env.DISCORD_CLIENT_ID,
        clientSecret: process.env.DISCORD_CLIENT_SECRET,
        callbackURL: process.env.DISCORD_CALLBACK
    },
    (accessToken: string, refreshToken: string, profile: any, cb: any) => {
        User.findOrCreate({ discordId: profile.id }, (err, user) => {
            return cb(err, user);
        });
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.011428571428571429, 'mean_word_length': 2.9914529914529915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5893606', 'n_tokens_mistral': 462, 'n_tokens_neox': 443, 'n_words': 112}