NodeJ has built-in methods for detecting the machine it is running on:
process.arch
returns the operating system CPU architecture. Possible values:
arm
- 32-bit Advanced RISC Machinearm64
- 64-bit Advanced RISC Machineia32
- 32-bit Intel Architecturemips
- 32-bit Microprocessormipsel
- 64-bit Microprocessorppc
- PowerPC Architectureppc64
- 64-bit PowerPC Architectures390
- 31-bit The IBM System/390s390x
- 64-bit The IBM System/390x32
- 32-bit extended systemsx64
- 64-bit extended systems https://nodejs.org/api/process.html#processarch
process.platform
returns the operating system platform. Possible values:
aix
- IBM AIX platformdarwin
- Darwin platform(MacOS, IOS etc)freebsd
- FreeBSD Platformlinux
- Linux Platformopenbsd
- OpenBSD platformsunos
- SunOS platformwin32
- Windows platform https://nodejs.org/api/process.html#processplatform
When using both combinations of values there are: 11 architectures x 7 platforms = 77 possible combinations
. It's not realistic to build/test/support all of them.
What are the most common CPU architectures and system platforms for personal computers?
(Would be great if you have computer sales data, market share, website viewer statistics, e.g. https://gs.statcounter.com/os-market-share)