Hey there so I have a Express js + React js application. I currently use MySQl for my database management. In my database I store variables for each user such as their email, password(hashed), and their user id. This works great; however, I wish to make an inventory for the user. This would be an array where it has values to save the ID of the item they own and the name of it. How would I go about doing this? Should I make something in my database? Or create a text/json file storing those variables to describe their inventory and store it on the server? Any answers will help! I am extremely new to developing full-stack web applications.
>Solution :
Short answer:
Yes
The long answer:
There are over 10 million hackers in the world today and even the newest hackers know how to hijack a system using malware. This means that storing user uploaded media files on the same system as server files is exposing the entire server and it’s files responsible for it’s activities to the probability of a hijack.
Where then should I store the files?
Use a CDN (Content delivery network).