Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How long does hoodie data persist? The tracker app doesn't have a couchdb? #144

Open
JackEdwardLyons opened this issue Dec 20, 2017 · 3 comments

Comments

@JackEdwardLyons
Copy link

Hi there,

This is probably a stupid question, but I'm a front end dev looking to get started on backend web dev. I found hood.ie that way :)

Correct me if I am wrong, but hood.ie just uses local storage for data persistence and then needs to be linked in with couchdb for a proper db? The tracker app doesn't seem to be linked with couchdb, so I'm wondering how long that data persists for?

Do you have any other code demos that use couchdb?

@gr2m
Copy link
Member

gr2m commented Dec 20, 2017

Hey Jack! Welcome to Hoodie, where there are no stupid questions ;)

Hoodie is using PouchDB under the "hood" to store data on the client. PouchDB is just JavaScript, so it can be used in Node.js as well. Which is exactly what we do by default :) We use PouchDB on the server and use a file system adapter to store data persistently, into the .hoodie/data folder.

We did that in order to lower the barrier for people to get started with Hoodie, all it takes is npm install hoodie and you have all you need :) Once your app evolves and you want to deploy it somewhere, you should definitely use CouchDB though, it's much more scalable and reliable. You will have to configure the dbUrl option for that, see http://docs.hood.ie/en/latest/guides/configuration.html

Let me know if you have any further questions :)

@JackEdwardLyons
Copy link
Author

Ah cool, thanks for the reply. So pouchDB persists the data similar to localStorage, but the benefit of having the couchDB is that when the user is back online the data syncs up and is stored properly. That sounds great.

In order to get hosting and a basic setup deployed, are there any cost effective (or free) hosting company's that you prefer?

Thanks for the fast response 👍

@gr2m
Copy link
Member

gr2m commented Dec 20, 2017

To get started and for small apps, I would suggest https://glitch.com/. Here is a Hoodie app to get you started: https://glitch.com/edit/#!/hoodie You can "remix" it to make your own copy and to play around with it. It will persist data using the file system like described above. Glitch is cool because you can directly hack on it and each time you change something, it simply restarts your app. You can run your app at .glitch.me, e.g. https://hoodie.glitch.me/

Once you want to have several users to use your app, I would recommend to use Cloudant: https://www.ibm.com/cloud/cloudant It has a free plan that should be enough for some time.

Hope that helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants