<commit_before>import { version, keywords } from '../../package.json';
import { Router } from 'express';
import tweets from './tweets';
import config from '../config.json';
import { OAuth } from 'oauth';
var app = require('../index');

const REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token';
const ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token';
const OAUTH_VERSION = '1.0';
const HASH_VERSION = 'HMAC-SHA1';

const consumer_key = config.consumer_key;
const consumer_secret = config.consumer_secret;
const callback_url = config.callback;

const oa = new OAuth(REQUEST_TOKEN_URL, ACCESS_TOKEN_URL, consumer_key, consumer_secret, OAUTH_VERSION, callback_url, HASH_VERSION);

let _oauth_access_token_secret;

export default ({ config, db }) => {
	let api = Router();

	// mount the facets resource
	api.use('/tweets', tweets({ config, db }));

	// perhaps expose some API metadata at the root
	api.get('/', (req, res) => {<commit_msg>hotfix twitter callback url variable<commit_after>import { version, keywords } from '../../package.json';
import { Router } from 'express';
import tweets from './tweets';
import config from '../config.json';
import { OAuth } from 'oauth';

const REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token';
const ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token';
const OAUTH_VERSION = '1.0';
const HASH_VERSION = 'HMAC-SHA1';

const consumer_key = config.consumer_key;
const consumer_secret = config.consumer_secret;
const callback_url = config.callback_url;

const oa = new OAuth(REQUEST_TOKEN_URL, ACCESS_TOKEN_URL, consumer_key, consumer_secret, OAUTH_VERSION, callback_url, HASH_VERSION);

let _oauth_access_token_secret;

export default ({ config, db }) => {
	let api = Router();

	// mount the facets resource
	api.use('/tweets', tweets({ config, db }));

	// perhaps expose some API metadata at the root
	api.get('/', (req, res) => {
{'fraction_non_alphanumeric': 0.1407061266874351, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 5.059748427672956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5853714', 'n_tokens_mistral': 626, 'n_tokens_neox': 620, 'n_words': 167}