<commit_before>'use strict';

var cleanBaseURL = require('../../../../utilities/clean-base-url');
var debug        = require('debug')('ember-cli:serve-files');

function ServeFilesAddon(project) {
  this.project = project;
  this.name = 'serve-files-middleware';
}

ServeFilesAddon.prototype.serverMiddleware = function(options) {
  var app = options.app;
  options = options.options;
  debug('serverMiddleware: %s',options.outputPath);

  var broccoliMiddleware = options.middleware || require('broccoli/lib/middleware');
  var middleware = broccoliMiddleware(options.watcher);

  var baseURL = cleanBaseURL(options.baseURL);

  debug('serverMiddleware: output: %s baseURL: %s', options.outputPath, baseURL);

  app.use(function(req, res, next) {<commit_msg>configure broccoliMiddleware to hook into our liveReload (dirty hack for now) <commit_after>'use strict';

var cleanBaseURL = require('../../../../utilities/clean-base-url');
var debug        = require('debug')('ember-cli:serve-files');

function ServeFilesAddon(project) {
  this.project = project;
  this.name = 'serve-files-middleware';
}

ServeFilesAddon.prototype.serverMiddleware = function(options) {
  var app = options.app;
  options = options.options;
  debug('serverMiddleware: %s',options.outputPath);

  var broccoliMiddleware = options.middleware || require('broccoli/lib/middleware');
  var middleware = broccoliMiddleware(options.watcher, {
    liveReloadPath: '/ember-cli-live-reload.js'
  });

  var baseURL = cleanBaseURL(options.baseURL);

  debug('serverMiddleware: output: %s baseURL: %s', options.outputPath, baseURL);

  app.use(function(req, res, next) {
{'fraction_non_alphanumeric': 0.14957264957264957, 'fraction_numerical': 0.0, 'mean_word_length': 4.96, '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': '522148', 'n_tokens_mistral': 508, 'n_tokens_neox': 501, 'n_words': 99}