Closed shroudedcode closed 7 years ago
if (/^x\d+/.test(process.arch)) {
console.log("I'm on a normal computer. :I");
} else {
console.log("I'm on a Benja device! :D");
}
@WebReflection Thanks for the quick answer!
sorry I rushed, but re-creating 12 ISO of 8 GB each to put some info you could discover otherwise is not my highest priority now.
However, you're totally right, there should be some unique env variable to check against.
That's the best way to go, but not these days. Apologies.
P.S. will be in, next deploy!
It would be great if Benja would always set a specific environment variable to true, maybe
BENJA
orBENJA_OS
. This would allow developers to easily check whether their application is currently running on a Benja device, like this:Travis CI offers a similar variable called
TRAVIS
that indicates that a program is run by a Travis build.