<commit_before>/**
 * Main Node file
 */
var exec = require('child_process').exec,
	watcher = require('./modules/watcher'),
	livereloader = require('./modules/livereloader'),
	utils = require('./modules/utils'),
	http = require('http'),
	waitingTheServer = true,
	INTEGRATION_TEST = global.INTEGRATION_TEST || false,
	PORT = normalizePort(process.env.STYLEGUIDE_PORT || process.env.PORT || '9241');

function waitTheServer() {
	console.log('Waiting the server on port ' + PORT);
	if(waitingTheServer) {
		http.get({
			host: 'localhost',
			port: PORT,
			path: '/'
		}, function(res) {
			console.log(res.statusCode);
			if(res.statusCode == 200) {
				if (!INTEGRATION_TEST) exec('echo "Done! Enjoy!" && echo "PROGRESS:100" && open "http://localhost:' + PORT + '"', utils.puts);
				if (INTEGRATION_TEST) INTEGRATION_TEST.run(PORT);
				waitingTheServer = false;

				// Files watcher
				watcher.start();
			}
			res.emit('end');
			waitTheServer();<commit_msg>Testing Travis for browser testing..<commit_after>/**
 * Main Node file
 */
var exec = require('child_process').exec,
	watcher = require('./modules/watcher'),
	livereloader = require('./modules/livereloader'),
	utils = require('./modules/utils'),
	http = require('http'),
	waitingTheServer = true,
	INTEGRATION_TEST = global.INTEGRATION_TEST || false,
	PORT = normalizePort(process.env.STYLEGUIDE_PORT || process.env.PORT || '9241');

function waitTheServer() {
	if(waitingTheServer) {
		http.get({
			host: 'localhost',
			port: PORT,
			path: '/'
		}, function(res) {
			console.log(res.statusCode);
			if(res.statusCode == 200) {
				if (!INTEGRATION_TEST) exec('echo "Done! Enjoy!" && echo "PROGRESS:100" && open "http://localhost:' + PORT + '"', utils.puts);
				if (INTEGRATION_TEST) INTEGRATION_TEST.run(PORT);
				waitingTheServer = false;

				// Files watcher
				watcher.start();
			}
			res.emit('end');
			waitTheServer();
{'fraction_non_alphanumeric': 0.1732490784623486, 'fraction_numerical': 0.010531858873091101, 'mean_word_length': 4.177111716621253, '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': '6948402', 'n_tokens_mistral': 723, 'n_tokens_neox': 641, 'n_words': 125}