I have my routes difined, and when i navigate to products/new, works fine, but if refresh page, he products/new not enter, he returns unexpected token.
Route Config.
<Router history={createBrowserHistory()}>
<Route path="/" component={Layout}>
<IndexRoute component={Home} />
<Route path="produtos/novo" component={ProductsNew}/>
<Route path="produtos" component={Products} />
</Route>
products/newin the code you have provided. That is probably the reason, although I'd need more information to help you...const express = require('express') const path = require('path') const port = process.env.PORT || 8000 const app = express() // serve static assets normally app.use(express.static(__dirname + '/public')) // handle every other route with index.html, which will contain // a script tag to your application's JavaScript file(s). app.get('*', function (request, response){ response.sendFile(path.resolve(__dirname, 'public', 'index.html')) }) app.listen(port) console.log("server started on port " + port)produtos/novo?