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).
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 innewProduct
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).