Skip to content

Opening web interface with /status url #7

Description

@markkubis

So, basically React app is using react router for handling routes on a frontend side. On a backend side Express uses it's own router, with a distinction for WebApp(api and status) and ReactApp(/).

So, what's the problem. If you go to the main app route http://kyero-takebot.herokuapp.com/ everything works fine. If you click on a status your route will change to http://kyero-takebot.herokuapp.com/status which is also fine - frontend routing is working no backend involved. The problem occurs when you reload the page. Then it's not even hitting a frontend side because it's being catched by Express router and page is returning you a ok 200 instead of the react page.

In order to avoid it we can

a) Hide everything related to the react app under the app/* route
b) change a content type of the request for status

whatever suits you @LynxEyes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions