Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Where are the data stored retrieved by the JavaScript application?

Hi there,

I'm creating an application with JavaScript that allow the client to publish information which must be submitted to their customers to confirm (Pub/sub architecture). Once I have created the application and it is run, where does the data inserted by the user is stored to be retrieved?

1 Answer

Hi Murilo,

In order to persist the data that's entered, it will need to be stored in a database. Postresql is a great opensource database you could use, or you could go for mongoDB, or google firestore. There are a fair few options to be honest. But to answer your question, you need a database of some sort. There is a possibility of using browser caching and indexDB, but that will only make the data accessible to the user on the device they used to enter the info. I hope that answers your question.

Perfect, this answers my question and I understood it very well. It helped a lot. Thank you Kevin.