micro-analytics / micro-analytics-cli

Public analytics as a Node.js microservice. No sysadmin experience required! 📈
MIT License
734 stars 39 forks source link

Redis adapter #9

Closed juandjara closed 7 years ago

juandjara commented 7 years ago

This pull request adds redis support to the service. I checked it against the existing tests and all the tests are passing. Also, I could finally deploy it to now.sh using redis-labs, and here it is

mxstbr commented 7 years ago

This is extremely cool! I won't merge this as-is, as I want the database to be choosable, but this is an amazing proof of concept, thanks so much! Please chime into #8!

juandjara commented 7 years ago

You're welcome! I understand that this is not merged and will check the discusion on the db plugin At least all db methods are using promises now, so that's a starting point!

mxstbr commented 7 years ago

At least all db methods are using promises now, so that's a starting point!

Oh yeah, that's totally true I missed that! Would it be possible to make just that change for now, but leaving flat-file-db in? That'd make the eventual change towards database adapters much easier! Thanks!

juandjara commented 7 years ago

Sure! Just need to wrap sync flat-file-db methods in Promise.resolve