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