There is a rocket reactor of such a plan:

ReactDOM.render( ( <Router history={browserHistory}> <Route name="main" path='/' component={App}/> <Route name="competitions" path='/competitions' component={Competitions}/> <Route name="contracts" path='/contracts' component={Contracts}/> <Route name="contract" path='/contract' component={Contract}/> <Route name="history" path='/history' component={PaymentHistory}/> <Route name="settings" path='/settings' component={Settings}/> <Route name="withdrawal" path='/withdrawal' component={Withdrawal}/> <Route name="confirm" path='/confirm' component={Confirm}/> <Route path='*' component={App} /> </Router> ), document.getElementById("wrap") ); 

on the server side, a handler is installed, for example:

 app.use(function(request,response){ console.log(1) }); 

if you manually send a request to localhost: 8080/1 is displayed in the console, but if you log in from the browser at this address, then 0 emotions. What is the problem, tell me?

  • try something like this: app.get('/', (req, res) => { console.log(1); }); - spectre_it
  • I'm doing the same thing, the default is "/", it does not work anyway - pshx

0