Re: Server rendering react using cherrypy...
Tim Roberts <[email protected]> Sun, 15 Jan 2017 23:23:16 -0800
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
On Jan 15, 2017, at 10:00 PM, Sam <[email protected]> wrote: > > I have written a web app all in cherrypy and sqlalchemy on the backend. > > The front end is all react. (I use mako templates but basically just to create a single div, and call the react script). > I'd like to pre-render the pages on the server. I've seen some tutorials and instructions for Python in general, but nothing specifically for cherrypy. I'm a little confused by your description. When I hear "front end" and "back end", I assume that web requests go into the front-end first, and the front-end internally makes requests to the back-end for data. If that's the case, then your desire doesn't make much sense, because the react scripts will always see the request first. If the requests go to CherryPy first, then you certainly have the opportunity to cache results into files and use them later, but you might consider whether using a reverse proxy as the first contact makes sense. — Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.