<commit_before>import express from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';

// utils
import f from './util/format.js';
import db from './util/database.js';
import encryption from './util/encryption.js';

// routes
import sensor from './routes/sensor.js';
import user from './routes/user.js';
import data from './routes/data.js';

// middleware
import log from './middleware/logger.js';

import cfg from './config/config.json';

const app = express();

app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());

app.use(log);

app.get('/api', (req, res) => {<commit_msg>Added a static route to host the app from express<commit_after>import express from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';
import path from 'path';

// utils
import f from './util/format.js';
import db from './util/database.js';
import encryption from './util/encryption.js';

// routes
import sensor from './routes/sensor.js';
import user from './routes/user.js';
import data from './routes/data.js';

// middleware
import log from './middleware/logger.js';

import cfg from './config/config.json';

const app = express();

app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());

app.use(log);

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

app.get('/api', (req, res) => {
{'fraction_non_alphanumeric': 0.1829356471438901, 'fraction_numerical': 0.0, 'mean_word_length': 4.262357414448669, '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': '7348639', 'n_tokens_mistral': 432, 'n_tokens_neox': 439, 'n_words': 130}