<commit_before>/* eslint-disable no-console */

const config = require('./config');

(async () => {
    try {
        const db = await (require('./db').init(config.connectionString));
        const data = await require('./data').init(db);
        const app = await require('./app').init(data);

        app.listen(config.port, () =>
            console.log(`Car Rentals is now live at http://localhost:${config.port}`));
    } catch (err) {
        console.log(err.message);
    }
})();<commit_msg>refactored server.js to use Promises<commit_after>/* eslint-disable no-console */

const config = require('./config');
const async = () => {
    return Promise.resolve();
};

async()
    .then(() => require('./db').init(config.connectionString))
    .then((db) => require('./data').init(db))
    .then((data) => require('./app').init(data))
    .then((app) => {
        app.listen(config.port, () =>
            console.log(`Car Rentals is now live at http://localhost:${config.port}`));
    })
    .catch((err) => {
        console.log(err);
    });
{'fraction_non_alphanumeric': 0.21469465648854963, 'fraction_numerical': 0.0, 'mean_word_length': 2.773381294964029, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4344620', 'n_tokens_mistral': 317, 'n_tokens_neox': 315, 'n_words': 63}