<commit_before># `<ServerRouter>`

Server rendering is a bit more involved to properly handle `<Redirect>`
and `<Miss>` in your app. Not only do you want to respond with the
proper status code, but also, both function on the result of rendering
so we have to sort of recreate `componentDidMount` for the server. For
the exeptional case of not matching any patterns you'll use a two-pass
render to render the `<Miss>` components.

Here's an example that sends 301 for redirects and properly renders your
app when no patterns match the url:

```js
import { createServer } from 'http'
import React from 'react'
import { renderToString } from 'react-dom/server'
import { ServerRouter, createServerRenderContext } = 'react-router'

createServer((req, res) => {
<commit_msg>Fix ServerRouter import statement on website (#3818)<commit_after># `<ServerRouter>`

Server rendering is a bit more involved to properly handle `<Redirect>`
and `<Miss>` in your app. Not only do you want to respond with the
proper status code, but also, both function on the result of rendering
so we have to sort of recreate `componentDidMount` for the server. For
the exeptional case of not matching any patterns you'll use a two-pass
render to render the `<Miss>` components.

Here's an example that sends 301 for redirects and properly renders your
app when no patterns match the url:

```js
import { createServer } from 'http'
import React from 'react'
import { renderToString } from 'react-dom/server'
import { ServerRouter, createServerRenderContext } from 'react-router'

createServer((req, res) => {

{'fraction_non_alphanumeric': 0.07731305449936629, 'fraction_numerical': 0.0063371356147021544, 'mean_word_length': 5.049808429118774, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1655442', 'n_tokens_mistral': 442, 'n_tokens_neox': 409, 'n_words': 221}