PouchDb on PAAS (Heroku, Bluemix, etc.)

I got great feedback from Stackoverflow and wanted to check out another idea.

I currently have a webapp that runs nodejs on PAAS (Heroku and trying to use bluemix). The server is configured to communicate with Couchdb (hosted on a cloud basis). Two types of data are stored in db: firstly, user data (each user will have their own database), and secondly, the application data itself (metrics, user account data (auth / admin material).

After excellent feedback, the idea is that after the user logs in, they synchronize with the local (browser) instance of pouchdb with Cloudant (possibly proxied through my server, as recommended here).

Now the question is, for the application / administrator data, maybe I am running a couchdb instance on my server, so I am not repeating network calls for things like user logins, metrics data, etc. The data will not be very large, and is already separated from user data calls. The fact is that mainly for speeding up / local authentication instance, changes / updates are synchronized outside user requests.

The backend is in a pronounced web structure, and it looks like my options are pouchdb .... to sync with an instance of Cloudant?

If I need local access to db (a supported instance of Couchdb) on a node / express server running on PAAS, is this the recommended setting?

Thanks vm for any feedback, Paul

+5
source share
1 answer

Not sure if you found a solution, but this is what I will try.

Since heroku cleans up any temporary data, you cannot start the express mail database by default, you will need to change the db package using the file system to use the LevelDOWN adapter. (Link to Pouchdb Adapters: https://pouchdb.com/adapters.html )

Some of these adapters will include: https://github.com/watson/mongodown https://github.com/kesla/mysqldown https://github.com/hmalphettes/redisdown

You can easily get the hero mondo, mysql or redis addon and connect this to the express-pouchdb backend.

This way you can save your data.

0
source

All Articles