DEV Community

Discussion on: My very first personnal project 🥳

Collapse
 
matveyclark profile image
Matthew Clark

Amazing project, especially for six months - really great progress. Having skimmed through the details, heres my two cents on some improvements that could present some more learning opportunities for you:

  • How are you storing the images? If they are stored on your server maybe you can look into storing them in some kind of cloud storage bucket (AWS S3, for example). Imagine if you have thousands of products, images may load up the server after a while.
    • Regarding that database connection string you pass to the .connect() method, probably best to hide sensitive information like that in environment variables. Look into a npm package called dotEnv, should do the trick.

Once again, great job and hopefully I added some value for improvements.

Collapse
 
killianfrappartdev profile image
Killian Frappart

Thank you for your feedback, I really appreciate you take from your time to help me improve !

I was actually kind of lost about how to store my images, at the moment I am simply storing images'URL as a string in the database. I am really considering learning how to use AWS.

You are 100% right on this point, I should really be more careful with my sensitive information and I'll fix that right now 😁

Collapse
 
matveyclark profile image
Matthew Clark

No problem at all 💪

I guess if its just a string in the database, thats not an issue. But then customers don't have the option to upload their own image of the product directly to your web app. If you would ever want to implement this functionality then its worth considering some cloud storage for your images 👍

Happy coding!