<commit_before>const dotenv = require('dotenv').config({ silent: process.env.NODE_ENV === 'production' });
const debug = require('debug')('node');

const server = require('./server');
const db = require('./db');

const crawlHeadlines = require('./crawl-headlines');
const fetchHeadlines = require('./fetch-headlines-from-db');
const compileJade = require('./compile-jade');

// register cron tasks
require('./cron')();

// initialize database connection
db.init();

const port = process.env.PORT || 3000;
server.init().listen(port, () => {

	Promise.resolve()
		.then(crawlHeadlines)
		.then(fetchHeadlines)
		.then(compileJade)
		.then(() => debug(`Server is up, listening on port ${port}`))
		.catch(err => {
			console.error(err.message);
			console.error(err.stack);
		});

});<commit_msg>fix(index.js): comments initial crawling out, to be used only locally<commit_after>const dotenv = require('dotenv').config({ silent: process.env.NODE_ENV === 'production' });
const debug = require('debug')('node');

const server = require('./server');
const db = require('./db');

const crawlHeadlines = require('./crawl-headlines');
const fetchHeadlines = require('./fetch-headlines-from-db');
const compileJade = require('./compile-jade');

// register cron tasks
require('./cron')();

// initialize database connection
db.init();

const port = process.env.PORT || 3000;
server.init().listen(port, () => {

	Promise.resolve()
		// .then(crawlHeadlines)
		.then(fetchHeadlines)
		.then(compileJade)
		.then(() => debug(`Server is up, listening on port ${port}`))
		.catch(err => {
			console.error(err.message);
			console.error(err.stack);
		});

});
{'fraction_non_alphanumeric': 0.19756838905775076, 'fraction_numerical': 0.004863221884498481, 'mean_word_length': 4.715277777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4760722', 'n_tokens_mistral': 540, 'n_tokens_neox': 502, 'n_words': 113}