AdventureLookup / adventurelookup-frontend

19 stars 3 forks source link

Remove hash (#) from urls #14

Open brehaut opened 8 years ago

brehaut commented 8 years ago

Without some server integration it's not possible to remove the hash from the URLs used on the front end up before users start bookmarking things.

Once the front end is part of the development docker image we can set up url rewriting and the appropriate dev server mechanism to allow proper URLs

It's important to do this because the hash exposed implementation details about the front end which could make it harder for us to change imp in the future.

Depends on #3, #5

templetonpr commented 8 years ago

More information about this: https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md

(Specifically, we're currently using hashHistory and would want to switch to browserHistory)

This should be pretty simple to switch over, and we would definitely want to do so before release. It will require some server configuration though, and we might want to wait on that until the routing gets a bit more finalized.

ahstro commented 8 years ago

When we did this on asother project I work on, it was simply a matter of adding

server { 
    ...
    location / {
        try_files $uri /index.html;
    }
}

to the nginx config, as suggested in the page linked to by @templetonpr.

On another note, this feels more like it should be labeled enhancement, not bug.

brehaut commented 8 years ago

I think some context may have gotten lost between here and discord. The reason this ticket exists at all is that theres still some setup and coordination about how the dev mode for the front end is going to interact server config vs how it runs in live mode.

yes the actual change to make nginx do the job for prod is trivial.

I'm going to leave it as a bug because its a bug; hash path urls are an artefact of 2009 single page apps and have no place in a brand new 2016 project. It's easy to fix now, before we get hash paths urls linked out in the real world.