Zaggermeister
Well Known Member
Hey everyone. Hope you're all having a fantastic day.
So currently I'm tasked with receiving an input from the GPIO on a Raspberry Pi, then I need to update a MySQL DB and have my Angular site reflect the changes.
RPi is working great, got my input working correctly but I had a recent change of scope for my project. My lecturer wants me to not host everything on my RPi, he wants me to host the Webservice (Node.js) on a separate PC and just let my RPi make some kind of a callback to the Webservice and update the DB over the interwebs. At first this seemed like a rather simple thing but my lack of knowledge regarding everything web-related is posing a problem.
At the moment my DB is set up, I have some members of my team setting up the front-end and I've got another group setting up the webservice. As far as I know both of these components should be done together but we're pushed for time at this stage.
My questions are the following:
How would I send the signal that a button has been pushed on my RPi to the webservice?
When working with an API, is it fine to only have CRUD methods if my website is solely responsible for displaying data from the DB in a pretty fashion?
So let's assume the user needs data displayed in a different measurement unit, would it be okay to just simply convert my data in the DB to the required format in the API or on the front-end once it receives data, instead of changing the data in my DB?
Is my stack a good combination, or are there simpler ways to do this?
So currently I'm tasked with receiving an input from the GPIO on a Raspberry Pi, then I need to update a MySQL DB and have my Angular site reflect the changes.
RPi is working great, got my input working correctly but I had a recent change of scope for my project. My lecturer wants me to not host everything on my RPi, he wants me to host the Webservice (Node.js) on a separate PC and just let my RPi make some kind of a callback to the Webservice and update the DB over the interwebs. At first this seemed like a rather simple thing but my lack of knowledge regarding everything web-related is posing a problem.
At the moment my DB is set up, I have some members of my team setting up the front-end and I've got another group setting up the webservice. As far as I know both of these components should be done together but we're pushed for time at this stage.
My questions are the following:
How would I send the signal that a button has been pushed on my RPi to the webservice?
When working with an API, is it fine to only have CRUD methods if my website is solely responsible for displaying data from the DB in a pretty fashion?
So let's assume the user needs data displayed in a different measurement unit, would it be okay to just simply convert my data in the DB to the required format in the API or on the front-end once it receives data, instead of changing the data in my DB?
Is my stack a good combination, or are there simpler ways to do this?