Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Initiate FeedManager with a configuration objectΒ #29

@avanderpluijm

Description

@avanderpluijm

To make the module more flexible, would it be an idea to instantiate the Feedmanager with an object? Instead of a file in the application's root?
In my case I have a settings file ./config/settings.js which stores all application environment variables (including the stream keys).
And I have a ./config/getstream.js with:

var settings = require('./settings');
module.exports = {
  apiKey: settings.getStream.key,
  apiSecret: settings.getStream.secret,
  apiAppId: settings.getStream.appId,
  apiLocation: '',
  userFeed: 'user',
  notificationFeed: 'notification',
  newsFeeds: {
    flat: 'timeline',
    aggregated: 'timeline_aggregated'
  }
};

I then initiate the feedmanager with

var streamConfig = require('../../config/getStream');
var FeedManager = stream_node.FeedManager(streamConfig);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions