I'm working through a react with node tutorial and i have some code that looks like this:
if(process.env.UNIVERSAL){
markup = ReactDOMServer.renderToString(...)
.
.
.
}
I understand that process.env stores environment variables but i'm not sure what UNIVERSAL
is or where it comes from. I tried to print it out in this code:
const port = process.env.PORT || 3000;
const env = process.env.NODE_ENV || 'production';
server.listen(port, err => {
if (err) {
return console.error(err);
}
console.info(process.env.UNIVERSAL + ' test');
console.info(`Server running on http://localhost:${port} [${env}]`);
});
But it comes out undefined. Any idea what process.env.UNIVERSAL
is?
via rage