<commit_before>var express = require('express')
var basicAuth = require('http-auth')

var app = express()

var basic = basicAuth.basic({
    realm: 'Admin Stuff'
}, function(username, password, callback) {
    callback(username == 'admin' && password == 'password');
})

var authMiddleware = basicAuth.connect(basic)

app.get('/deploy',authMiddleware,function(req,res){
    res.json({status:"deploying"})
})

app.listen(3009)<commit_msg>git via node added to endpoint<commit_after>var express = require('express')
var basicAuth = require('http-auth')
var git    = require('gitty');
var vaultGit = git('./');

var app = express()

var basic = basicAuth.basic({
    realm: 'Admin Stuff'
}, function(username, password, callback) {
    callback(username == 'admin' && password == 'password');
})

var authMiddleware = basicAuth.connect(basic)

app.get('/deploy',authMiddleware,function(req,res){
    vaultGit.pull(function(err, log){
        if (err) return console.log('Error:', err);
        else res.json({status:"deploying", gitlog: log})
    })
})

app.listen(3009)
{'fraction_non_alphanumeric': 0.17057169634489222, 'fraction_numerical': 0.007497656982193065, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2073442', 'n_tokens_mistral': 337, 'n_tokens_neox': 331, 'n_words': 76}