<commit_before>'use strict';

var path = require('path')
var fs = require('fs')
var express = require('express');
var app = new express()
var port = 8080

app.get('/api/product', function(req, res) {
    res.sendFile(path.join(__dirname, '/../server/products.json'))
})

app.get('/', function(req, res) {
    res.sendFile(path.join(__dirname, 'index.html'))
})

app.use('/build', express.static(path.join(__dirname, '/')));

app.listen(port, function(error) {
    if (error) {
        console.error(error)
    } else {
        console.info('==> Application running at port %s', port)
    }
})<commit_msg>serve index.html on all unkown routes<commit_after>'use strict';

var path = require('path')
var fs = require('fs')
var express = require('express');
var app = new express()
var port = 8080

app.get('/api/product', function(req, res) {
    res.sendFile(path.join(__dirname, '/../server/products.json'))
})

app.use('/build', express.static(path.join(__dirname, '/')));

app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname, 'index.html'))
})

app.listen(port, function(error) {
    if (error) {
        console.error(error)
    } else {
        console.info('==> Application running at port %s', port)
    }
})
{'fraction_non_alphanumeric': 0.19724025974025974, 'fraction_numerical': 0.006493506493506494, 'mean_word_length': 3.892857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5592181', 'n_tokens_mistral': 415, 'n_tokens_neox': 408, 'n_words': 91}