Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Npm script run client-side JS before server-side NodeJS

I have a NodeJS script that needs to get the devices' screen size. I've found an npm package that does this, but since it gets the screen dimensions using the window object, I cannot include it in the NodeJS script.

Is there a way to define an npm script (defined in package.json as something like "run": "npm run getDimensions.js | node index") that will run the clientside JS to get screen dimensions, then pipe the height and width to the serverside NodeJS, or save it to a configuration file, or something?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!