0

I have a Phoenix (Elixir) and ReactJS app, and was able to remove the /#/ in the URL locally by turning on "location: Router.HistoryLocation" in router_store.js. However, when I uploaded the code to Heroku and rebooted the droplets, it doesn't work.

Router_store.jsx

var router = Router.create({
  routes: routes,
  location: Router.HistoryLocation
});

App.jsx

require('../css/app.less');
var React = require('react');
var router = require('./stores/router_store.jsx').getRouter();

router.run(function (Handler, state) {
  React.render(<Handler/>, document.getElementById('app'));
});

Server Code (Phoenix / Elixir Router) which pushes everything to the JS app within the Phoenix app.

get "/:page", PageController, :index 
get "/", PageController, :index

0 Answers0