Nodejs C++ addon to get device screen size
npm install nc-screen
or
yarn add nc-screen
const { getInfo } = require('nc-screen');
console.log(getInfo()); // {width: 1920, heigth: 1080}
sudo yarn build
or
sudo npm run build
You can read history changes from this doc.