On Jan 15, 2017, at 10:00 PM, Sam <
sams...@gmail.com> 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,
ti...@probo.com
Providenza & Boekelheide, Inc.