reactjs - How can I host a React webpack project with React Router 4 onto OpenShift? -
i'm try find best way host react/webpack application using react router.
can use node express that?
my first solution use route (*) server side, letting client logic of application handling routing
app.get('*', function (req, res) { res.render('index.html'); });
and index.html
file has simple structure :
<html> <body id='react-root'></body> <script src='bundle.js' /> </html>
are there better solution(s)?
Comments
Post a Comment