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

363
Views
¿Cómo compruebo si el servidor express se está ejecutando desde python?

Entonces llamo a mi backend.js desde mi código python así

 # server is requested to start startServer = subprocess.Popen(['node', 'backend.js']) # startServer.wait() if startServer.poll: print('Server could not be started') sys.exit()

Y mi backend.js contiene

 app.listen(port, () => { console.log(`Server is listening at http://localhost:${port}`); });

¿Cómo puede el backend decirle a Python que el servidor, por alguna razón, no pudo iniciar y salir del programa o que el servidor se inició y ahora puede continuar? Intenté esperar a que finalice startServer, pero eso solo detiene el código python hasta que se detiene el servidor. Entonces, ¿hay alguna forma en que la función de devolución de llamada en app.listen pueda enviar información al código python?

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!