<commit_before>express    = require 'express'
load       = require 'express-load'
d3         = require 'd3'
jsdom      = require 'jsdom'
cheerio    = require 'cheerio'

require 'fluentnode'

class D3_Server
  constructor: ->
    @.server = null
    @.port   = 3000

  setup_Server: =>
    
    @.app = express()
    @.app.d3 = d3
    @.app.jsdom = jsdom
    @.app.set 'view engine', 'jade'


    #routes
    #@.app.get '/', @.route_Main
    @.app.get '/'         , (req, res) => res.redirect 'd3-radar'
    @.app.get '/ping'     , (req, res) => res.end 'pong'
    @.app.get '/d3-radar' , (req, res) => res.render 'd3-radar'<commit_msg>small fix to support port set via environment variable<commit_after>express    = require 'express'
load       = require 'express-load'
d3         = require 'd3'
jsdom      = require 'jsdom'
cheerio    = require 'cheerio'

require 'fluentnode'

class D3_Server
  constructor: ->
    @.server = null
    @.port   = process.env.port || 3000

  setup_Server: =>
    
    @.app = express()
    @.app.d3 = d3
    @.app.jsdom = jsdom
    @.app.set 'view engine', 'jade'


    #routes
    #@.app.get '/', @.route_Main
    @.app.get '/'         , (req, res) => res.redirect 'd3-radar'
    @.app.get '/ping'     , (req, res) => res.end 'pong'
    @.app.get '/d3-radar' , (req, res) => res.render 'd3-radar'
{'fraction_non_alphanumeric': 0.1728024042073629, 'fraction_numerical': 0.018031555221637866, 'mean_word_length': 2.2096385542168675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7350997', 'n_tokens_mistral': 525, 'n_tokens_neox': 512, 'n_words': 118}