<commit_before>// specify env file path within the dotenv require module
require('dotenv').config({path: 'your_env_file.env'});
var fetch = require('isomorphic-fetch');
var express = require('express');
var app = express();

// set variables with API call URL
var weatherURL = `http://api.openweathermap.org/data/2.5/weather?units=imperial&APPID=${process.env.WEATHER_KEY}`;
var forecastURL = `http://api.openweathermap.org/data/2.5/forecast?units=imperial&APPID=${process.env.WEATHER_KEY}`;
var twitchURL = `https://api.twitch.tv/kraken/streams/`;

// enable CORS for cross-browser support
app.use(function(req, res, next) {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
    res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
    next();
});

// populate express get methods for JSON fetch
app.get('/weather/:lat/:lon', function (req, res) {
    fetch(`${weatherURL}&lat=${req.params.lat}&lon=${req.params.lon}`)
        .then(response => response.json())
        .then(weather => res.send(weather))
        .catch(error => res.send(error))
});
app.get('/forecast/:lat/:lon', function (req, res) {
    fetch(`${forecastURL}&lat=${req.params.lat}&lon=${req.params.lon}`)
        .then(response => response.json())
        .then(forecast => res.send(forecast))
        .catch(error => res.send(error))
});
app.get('/streams/:channel', function (req, res) {<commit_msg>change twitch call to channels<commit_after>// specify env file path within the dotenv require module
require('dotenv').config({path: 'path_to_file.env'});
var fetch = require('isomorphic-fetch');
var express = require('express');
var app = express();

// set variables with API call URL
var weatherURL = `http://api.openweathermap.org/data/2.5/weather?units=imperial&APPID=${process.env.WEATHER_KEY}`;
var forecastURL = `http://api.openweathermap.org/data/2.5/forecast?units=imperial&APPID=${process.env.WEATHER_KEY}`;
var twitchURL = `https://api.twitch.tv/kraken/channels/`;

// enable CORS for cross-browser support
app.use(function(req, res, next) {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
    res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
    next();
});

// populate express get methods for JSON fetch
app.get('/weather/:lat/:lon', function (req, res) {
    fetch(`${weatherURL}&lat=${req.params.lat}&lon=${req.params.lon}`)
        .then(response => response.json())
        .then(weather => res.send(weather))
        .catch(error => res.send(error))
});
app.get('/forecast/:lat/:lon', function (req, res) {
    fetch(`${forecastURL}&lat=${req.params.lat}&lon=${req.params.lon}`)
        .then(response => response.json())
        .then(forecast => res.send(forecast))
        .catch(error => res.send(error))
});
app.get('/channels/:channel', function (req, res) {
{'fraction_non_alphanumeric': 0.196524064171123, 'fraction_numerical': 0.00267379679144385, 'mean_word_length': 4.511970534069982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '1390168', 'n_tokens_mistral': 984, 'n_tokens_neox': 977, 'n_words': 176}