markfinger / python-react

Server-side rendering of React components
MIT License
1.62k stars 116 forks source link

some trouble with Express 4 #22

Closed angrypoulpe closed 9 years ago

angrypoulpe commented 9 years ago

I have some problem to run the last build of django_react with express 4. The source of the problem seems to come from render.js. django_node send post request and thus request.query.var return nothing. To solve it, i changed every occurence of request.query.--- to request.body.--- in the "var service = function(request, response)" of render.js. Have a nice day !

markfinger commented 9 years ago

Yeah, master's pretty crazily unstable at the moment. I hit some issues with passing large data sets along, so I've been testing a couple of different solutions.

If you roll django-node back a day or two, it should work.

I'll try to update django-react's master branch when I have some time in the next day or two.

Otherwise, if you're happy to hack on stuff, you can check https://github.com/markfinger/django-frontend-tools/tree/master/django_frontend_tools/services for some samples that'll work with django-node's master branch. The changes mostly boil down to the request object no longer being passed in, rather the server will pass the data in as the first argument.

markfinger commented 9 years ago

Should be fixed now.

angrypoulpe commented 9 years ago

Thanks. I just succeed to make it work. I also modified webpack the same way to recover the data from django-node to build the bundle. Now the app start on the client side too. \o/