Nostradamus Prophecy Machine

    integreat-adapter-redis
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.6 • Public • Published

    Redis adapter for Integreat

    Adapter that lets Integreat access content in a Redis database.

    npm Version Build Status Coverage Status Dependencies Status Maintainability

    Getting started

    Prerequisits

    Requires node v14 and Integreat v0.8.

    Installing and using

    Install from npm:

    npm install integreat-adapter-redis
    

    Example of use:

    import integreat from 'integreat'
    import redisAdapter from 'integreat-adapter-redis'
    import defs from './config'
    
    const resources = integreat.resources({ transporters: { redis: redisAdapter } })
    const great = Integreat.create(defs, resources)
    
    // ... and then dispatch actions as usual

    Example source configuration:

    {
      id: 'store',
      adapter: 'redis',
      endpoints: [{
        options: {
          prefix: 'store',
          redis: { host: 'localhost', port: 6789 },
          concurrency: 5
          useTypeAsPrefix: true // Default is `true`
        }
      }]
    }

    The redis endpoint options are sent as-is to redis.createClient(). See node_redis documentation for options.

    Running the tests

    The tests can be run with npm test.

    Contributing

    Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests.

    License

    This project is licensed under the ISC License - see the LICENSE file for details.

    Keywords

    none

    Install

    npm i integreat-adapter-redis

    DownloadsWeekly Downloads

    29

    Version

    0.4.6

    License

    ISC

    Unpacked Size

    21.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • kjellmorten