node process os code example
Example 1: get platform node
const os = require('os');
console.log('Platform: ${os.platform()}');
Example 2: how to check platform in nodejs
var isWin = process.platform === "win32";
const os = require('os');
console.log('Platform: ${os.platform()}');
var isWin = process.platform === "win32";