<commit_before>var express = require('express')
  , http = require('http')
  , path = require('path')
  , reload = require('../lib/reload')
  , fs = require('fs')
  , open = require('open')

var app = express()

var port = process.argv[2]
  , dir = process.argv[3]
  , openBrowser = (process.argv[4] === 'true')
  , runFile = process.argv[5]
  , reloadDelay = process.argv[6]
  , wait = (string === "process.argv[7]")
  , startPage = process.argv[8]

var router = express.Router();

app.set('port', port)

router.get('/', function(req, res, next) {
  var startFile = path.join(dir, startPage)
  fs.exists(startFile, function(itDoes) {
    if (itDoes)
      sendhtml(startFile, res)
    else
      res.status(404).send("Can't find " + startPage);
  })
})

router.get('*.html', function(req, res) {
  //this wouldn't be efficient in any other context
  var file = path.join(dir, req.url)<commit_msg>Added proper argv7 check for true or false<commit_after>var express = require('express')
  , http = require('http')
  , path = require('path')
  , reload = require('../lib/reload')
  , fs = require('fs')
  , open = require('open')

var app = express()

var port = process.argv[2]
  , dir = process.argv[3]
  , openBrowser = (process.argv[4] === 'true')
  , runFile = process.argv[5]
  , reloadDelay = process.argv[6]
  , wait = (process.argv[7] === 'true' ? true : false)
  , startPage = process.argv[8]

var router = express.Router();

app.set('port', port)

router.get('/', function(req, res, next) {
  var startFile = path.join(dir, startPage)
  fs.exists(startFile, function(itDoes) {
    if (itDoes)
      sendhtml(startFile, res)
    else
      res.status(404).send("Can't find " + startPage);
  })
})

router.get('*.html', function(req, res) {
  //this wouldn't be efficient in any other context
  var file = path.join(dir, req.url)
{'fraction_non_alphanumeric': 0.18191721132897604, 'fraction_numerical': 0.011437908496732025, 'mean_word_length': 3.686224489795918, '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': '5029598', 'n_tokens_mistral': 650, 'n_tokens_neox': 636, 'n_words': 150}