I have created a node script which should run as a background process. Right after the script starts running run I need to get some user data (username & password).
After getting the user data I wish to close the terminal but the process should continue running in the background.
To complicate things, the node script is being built with pkg lib and will be started as an .exe
Here is a the code that will be executed:
async function init() {
try {
await fetchConfig();
const credentials = await getCredentials(); // this one prompts the request for user input
watchForNewFiles(credentials); // that one should use the credentials and continue running in the background.
} catch (e) {
console.error(e);
}
}
init();