<commit_before>import express from 'express'
import React from 'react'
import ReactDOM from 'react-dom/server'
import { createMemoryHistory } from 'history'
import { install } from 'mobx-little-router'
import App from './src/App'
import routes from './src/routes'
import DataStore from './src/DataStore'

const app = express()

app.get('*', (req, res) => {
  const dataStore = new DataStore()
  const ctx = {
    status: 200,
    dataStore: dataStore
  }
  const router = install({
    history: createMemoryHistory({ initialEntries: [req.url] }),
    routes,
    getContext: () => ctx
  })

  router.start(() => {
    const html = ReactDOM.renderToString(
      <App dataStore={dataStore} router={router} /><commit_msg>SSR example should use the react intsaller.<commit_after>import express from 'express'
import React from 'react'
import ReactDOM from 'react-dom/server'
import { createMemoryHistory } from 'history'
import { install } from 'mobx-little-router-react'
import App from './src/App'
import routes from './src/routes'
import DataStore from './src/DataStore'

const app = express()

app.get('*', (req, res) => {
  const dataStore = new DataStore()
  const ctx = {
    status: 200,
    dataStore: dataStore
  }
  const router = install({
    history: createMemoryHistory({ initialEntries: [req.url] }),
    routes,
    getContext: () => ctx
  })

  router.start(() => {
    const html = ReactDOM.renderToString(
      <App dataStore={dataStore} router={router} />
{'fraction_non_alphanumeric': 0.13704206241519673, 'fraction_numerical': 0.004070556309362279, 'mean_word_length': 3.867986798679868, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '771270', 'n_tokens_mistral': 450, 'n_tokens_neox': 445, 'n_words': 136}