I'm working on a web project and I'm not sure if I need database or not. The following steps summarises what I want my project to do:
- The server makes API calls to Google Docs API to get the document data
- The server renders the document data and store it
- The client gets the document data from the server and it gets displayed on the browser
- If any changes to the Google Docs are noticed, the server repeats (1) and (2).
From my limited web development experience, I think I have two options:
- Store it in the server as a variable while the server is running (A hashmap to store key-value pairs of rendered documents)
- Store it in some sort of database (e.g. MongoDB, MySQL etc.)
My question is, how do I know what the most appropriate way of storing such data?
FYI, I'm using React and Node (Express.js) backend. And the rendered data of a single document would look something like this:
{
lastModified: ...
renderedHTML: "<html> ... "
}
Aucun commentaire:
Enregistrer un commentaire