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

244
Views
Run multiple instance of a same script in nodeJS

I'm working on a website offering scraping with Puppeteer on NodeJS, so I decided to make a website using NodeJS and Express.

The scraping script must therefore be executed once a form has been completed.

The script must therefore be executed again for each new request without canceling the previous one. Hence I don't know how much script will be loaded in advance.

I think PM2 can be a good idea but, I'm not sure if it meets my needs.

Or I could use Node.js Cluster, this would allow me to create a fork for each filled form.

Here is the tree structure of my project:

my-app/
├─ bin/
│  ├─ www
├─ node_modules/
├─ public/
│  ├─ images/
│  ├─ javascript/
│  │  ├─ scrapper.js
│  │  ├─ script.js
│  ├─ stylesheets/
├─ routes/
│  ├─ index.js
├─ views/
│  ├─ error.pug
│  ├─ index.pug
│  ├─ layout.pug
├─ app.json
├─ package-lock.json
├─ package.json
about 4 years ago · Santiago Gelvez
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!