I created 10 js scripts that perform scraping actions (nodejs). They are composed as follows:
- initial part: login
- final part: specific actions for each script.
How can I externalize the login procedure in another file and include it? So that in case of changes, I would only change one file?
If it could be useful, I don’t need the file to be included to be .js. Even the “include txt” procedure, explode the content and run it, would be fine for me.
import test from './login_portale.js';
test()