@forrestjs/service-fetchq

ForrestJS service which helps setting up a Fetchq node.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@forrestjs/service-fetchq
5.0.0-alpha.1410 days ago2 years agoMinified + gzip package size for @forrestjs/service-fetchq in KB

Readme

@forrestjs/service-fetchq

ForrestJS FetchQ Service

Minimalist FetchQ wrapper that sets up a FetchQ client and injects it into the app's context.
const forrestjs = require('@forrestjs/core');
const serviceEnv = require('@forrestjs/service-env');
const serviceLogger = require('@forrestjs/service-logger');
const serviceFetchq = require('./service/service-fetchq');

const settingsHandler = ({ setConfig, getEnv }) =>
  setConfig('fetchq', {
    logLevel: 'info',
    connectionString: 'postgres://user:pass@host:port/db',
    skipExtension: true,
    queues: [
      {
        name: 'queue_name',
        isActive: true,
        enableNotifications: true,
      },
    ],
  });

forrestjs.run({
  trace: 'compact',
  settings: settingsHandler,
  services: [serviceEnv, serviceLogger, serviceFetchq],
});