<commit_before>'use strict'
var http = require('http')
var path = require('path')
var express = require('express')
var WebpackDevServer = require('webpack-dev-server')
var webpack = require('webpack')
var ipfs_static = require('ipfs-node-server-static')('localhost', 5001, {api: true})

/**
 * This is the same as `app.js`, but also runs a webpack dev server alongside and
 * proxies to it. This allows us to get hot reload.
 */

var port = process.env.PORT || 8010
var webpackPort = port + 1
var webpackURL = 'http://localhost:' + webpackPort
require('openurl').open('http://localhost:' + port)

var app = express()

app.get('(/)?', function (req, res) {
  res.sendFile('index.html', {root: path.join(__dirname, 'static', 'html')})
})

// proxy the bundle
app.get('/bundle.js', function (req, res) {
  http.get(webpackURL + req.url, function (resp) {
    resp.pipe(res)
  })
})

app.use(ipfs_static)
app.use(express.static(require('path').join(__dirname, 'build')))
app.use('/static', express.static(require('path').join(__dirname, 'static')))

var server = app.listen(port, function () {
  console.log('Static server listening on port', port)<commit_msg>Fix webpack proxy bundle name<commit_after>'use strict'
var http = require('http')
var path = require('path')
var express = require('express')
var WebpackDevServer = require('webpack-dev-server')
var webpack = require('webpack')
var ipfs_static = require('ipfs-node-server-static')('localhost', 5001, {api: true})

/**
 * This is the same as `app.js`, but also runs a webpack dev server alongside and
 * proxies to it. This allows us to get hot reload.
 */

var port = process.env.PORT || 8010
var webpackPort = port + 1
var webpackURL = 'http://localhost:' + webpackPort
require('openurl').open('http://localhost:' + port)

var app = express()

app.get('(/)?', function (req, res) {
  res.sendFile('index.html', {root: path.join(__dirname, 'static', 'html')})
})

// proxy the bundle
app.get('/bundle.min.js', function (req, res) {
  http.get(webpackURL + req.url, function (resp) {
    resp.pipe(res)
  })
})

app.use(ipfs_static)
app.use(express.static(require('path').join(__dirname, 'build')))
app.use('/static', express.static(require('path').join(__dirname, 'static')))

var server = app.listen(port, function () {
  console.log('Static server listening on port', port)
{'fraction_non_alphanumeric': 0.17881646655231562, 'fraction_numerical': 0.007718696397941681, 'mean_word_length': 4.982051282051282, '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': '6279115', 'n_tokens_mistral': 766, 'n_tokens_neox': 746, 'n_words': 207}