micro-analytics / adapter-redis Goto Github PK
View Code? Open in Web Editor NEWRedis adapter for micro-analytics
Home Page: https://www.npmjs.com/package/micro-analytics-adapter-redis
License: MIT License
Redis adapter for micro-analytics
Home Page: https://www.npmjs.com/package/micro-analytics-adapter-redis
License: MIT License
From micro-analytics documentation:
subscribe(pathname?: string): Observable
Should return an Observable (based on the proposed ECMAScript spec) which pings micro-
analytics whenever a key changes.If a pathname is passed it should have the same behaviour as getAll, where it listens to all keys that start with the passed pathname.
Usage
const subscription = adapter.subscribe('/hello')({ next(val) {/* Send new value */}, error(err) {/* Send error */}, complete() {/* Cleanup after unsubscription */}, }) // At any time subscription.unsubscribe()
Should write some tests โ๏ธ
Since this project is getting more attention than I expected, I've created the @micro-analytics organization on GitHub and invited you as a collaborator. (and @sean-roberts)
We should transfer this repo over and then rename it to "adapter-redis"!
Environment variable MAA_REDIS_DB_CONFIG
that contains a json string wich is parsed and sent to ioredis.
Running against the current master
branch of micro-analytics
:
โฏ DB_ADAPTER=redis ./cli.js
> [email protected] start /path/micro-analytics
> micro dist/index.js "/usr/bin/node" "/path/micro-analytics/cli.js"
micro: Error when importing /path/micro-analytics/dist/index.js: /path/micro-analytics/node_modules/micro-analytics-adapter-redis/index.js:24
),
^
SyntaxError: Unexpected token )
It would be sweet to be able to specify the port the database is running at, right?
Adapter should react on before and after options like adapter-flat-file-db.
Wanna send PR on this week.
Environment variable: MAA_REDIS_HASH_KEY
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.