Friday 19 October 2018

Server-side rendering with nginx?

As far as I can tell, nginx is usually set up to try and serve static files in some directory based on whatever file extensions are specified in the configuration file. If I have a node server whose responsibility is generating HTML strings to be served back to the client, does this server need to write the HTML into a directory in order for NGINX to see it? Or can I simply pass this response back to nginx, which can send it back to the client, without having to write the file anywhere (which seems wasteful I/O-wise)?Basically my question is: how do I pass the server-rendered HTML to nginx so that nginx can serve it to the client? It looks like a proxy_pass is what I need in my nginx config file? If anyone has experience doing this I'd be interested to hear about it.

Submitted October 19, 2018 at 09:46PM by ConfuciusBateman

No comments:

Post a Comment