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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -