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

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -