File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,11 @@ In production environments, you should ensure that `RENDER` is set to True.
196196You will want to run the render server under whatever supervisor process suits your need. Depending on
197197your setup, you may need to change the ` RENDER_URL ` setting to reflect your environment.
198198
199+ The render server should be run with the ` NODE_ENV ` environment variable set to ` production ` ,
200+ eg: ` NODE_ENV=production node render_server.js ` . React defaults to development mode and relies on the
201+ ` NODE_ENV ` variable to deactivate dev-oriented code (types and constraint checking) that slows down renders.
202+ Defining this variable will ensure that your code is rendered much faster.
203+
199204Depending on your load, you may want to use a worker farm to handle rendering. Node's
200205[ cluster module] ( https://nodejs.org/api/cluster.html ) provides an easy way to fork a process and serve
201206multiple instances from a single network address.
You can’t perform that action at this time.
0 commit comments