docs: function isomorphic(options = {}) {
      if (!(typeof options === 'object' && options.template))
          return isomorphic({
              routes: arguments[0],
              configStore: arguments[1],
              template: arguments[2],
              distPathName: arguments[3],
              injection: {
                  js: arguments[4]
              }
          })
  
      // TODO: 尝试解决闭包内存泄漏
      let { routes, configStore } = options
  
      return async (ctx, next) => {
  
          try {
              const memoryHistory = createMemoryHistory(ctx.url)
              const store = configStore(/*memoryHistory*/) // fix redux warring
              const history = syncHistoryWithStore(memoryHistory, store)
              const { redirectLocation, renderProps } = await asyncMatch({ history, routes, location: ctx.url })
  
              if (redirectLocation) {
                  ctx.redirect(redirectLocation.pathname + redirectLocation.search)
              } else if (renderProps) {
                  const cookies = cookie.parse(ctx.request.header.cookie || '')
  
                  // 准备语言到store中
  
                  // 先查看URL参数是否有语音设置
                  // hl 这个参数名是参考了Instargram
                  let lang = ctx.query.hl
  
                  // 如果没有，检查cookie
                  if (!lang && cookies.spLocaleId)
                      lang = cookies.spLocaleId
                  // 如果没有，再看header里是否有语言设置
                  if (!lang)
                      lang = ctx.header['accept-language']
                  // 如没有，再用默认
                  if (!lang)
                      lang = 'en'
  
                  // TODO: 修改成统一派发 CHANGE_SERVER_DATA
                  store.dispatch({ type: CHANGE_LANGUAGE, data: lang })
                  store.dispatch({ type: TELL_ME_URL, data: ctx.origin })
                  store.dispatch(i18nActionInit(store.getState()))
                  store.dispatch(i18nActionLocales())
  
                  // 告诉浏览器用的lang
                  // ctx.set('Content-Language', lang)
                  // ctx.set('Vary', 'Accept-Language, Accept-Encoding')
  
                  // 准备预处理数据到store中
                  await asyncStore(store, renderProps)
  
                  // 从react里处理并扩展到html
                  extendHtml(store, renderProps)
  
                  ctx.body = renderHtml(
                      renderToString(
                          <Provider store={store}>
                              <RouterContext {...renderProps } />
                          </Provider>
                      ),
                      store.getState(),
                      options
                  )
              } else {
                  await next()
              }
  
          } catch (e) {
              console.error('Server-Render Error Occures: %s', e.stack)
              ctx.status = 500
              ctx.body = e.message
          }
      }
  }