Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

138
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda