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

Initiate FeedManager with a configuration object #29

Open
avanderpluijm opened this issue Oct 30, 2017 · 0 comments
Open

Initiate FeedManager with a configuration object #29

avanderpluijm opened this issue Oct 30, 2017 · 0 comments
Assignees

Comments

@avanderpluijm
Copy link

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants