Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
Electron JS - Where can I safely implement Restful API in my application?

My client asked me to create an application using Electron both for the frontend and backend. I need to implement some API to get or post datas, but i can't seem to find out where is the safest way to implement them. I implemented them in the preload.js file, like this (using express js and postgresql and sequelize):

app.get('/users', async(req, res) => {
   try {
      const users = await User.findAll();
      return res.json(users);
   }catch (e) {
      console.log(e);
      return res.status(500).json({err: 'something went wrong'})
   }
});

But I've been reading that some malicious users could access the API in the preload file and run code on the user machine, I wanted to ask you where should I implement these APIs if there's a standard architecture for projects like this. Thank you.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda