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

144
Views
Process.exit() después de la solicitud http

Quiero enviar una notificación push con una solicitud http y luego llamar a la función process.exit() pero no funciona, el proceso se detiene pero la notificación push no se envía. Funciona si elimino la función process.exit. Aquí está el código:

 await page .waitForSelector(".guest", { timeout: 5000 }) .then(async () => { console.log("Not logged in, exiting"); await pushNotification("App has stopped, probably session expired."); process.exit(); }) async function pushNotification(msg) { var options = { method: "POST", url: "url", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ to: "", title: "", body: ``, }), }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); }
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!