pitfritsch / offline-electron-boilerplate

Boilerplate para projeto offline usando Electron+React+SQLite+TypeORM
7 stars 2 forks source link

Functionality questions #1

Open TomYeoman opened 2 years ago

TomYeoman commented 2 years ago

Nice demo repo thanks so much for making. I'm still trying to get my head around a few things.

1) Why is the server in public for, this is the first time I've seen this, why do we put it in here?

2) It seems there are 2 ways you show to add a product, one through raw SQL using ipcRenderer, and another where we actually talk to the DB directly in newProduct

When would we use each of these / why have we defined both. From what I have read, we should always use ipcRenderer to communicate with our backend (to prevent any un-sanitized data from having direct access to node API's).

TomYeoman commented 2 years ago

For anyone curious, the reason for (1) is so that create-react-app will automatically move the server into build.