Skip to content

Commit

Permalink
example: install globals if node <20 or INSTALL_GLOBALS
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Sep 8, 2023
1 parent 3f6134d commit 13405cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { installGlobals } from "@remix-run/node";

import * as serverBuild from "./build/index.mjs";

if (process.env.GLOBALS !== "true") {
let nodeMajor = Number(process.versions.node.split(".")[0]);

if (["true", "1"].includes(process.env.INSTALL_GLOBALS) || nodeMajor < 20) {
console.log(`installing remix globals`);
installGlobals();
} else {
Expand Down

0 comments on commit 13405cc

Please sign in to comment.