Tutorial for creating intranet app


#1

Hi there,

I’m a web developer and have been asked to write a desktop app, so naturally I turned to Electron :slight_smile:

I need to write an app that runs on multiple computers on the same network, and connects to a central DB for storing & retrieving information. I don’t know which computer on the network the DB will live on. Think client-server, but with the server being just a DB.

I’m looking for guidance on 3 things:

  1. How do I detect what IP the server has? Can I manually set configuration values when I install the app via the installer? Or can I show a settings dialog on first run?
  2. The architecture: being new to electron, I’m not really sure how I should structure this app. The possibilities I found are:
  • just as I explained above, having all the clients connect to the DB, which is somewhere on the network
  • having an API that would act as a server. This would mean I’m not connecting to the DB, but making requests from inside the electron window (the client-side JS)
  1. Any tutorials remotely related to what I want to do are most welcome.

Thank you.