var flux = require("flux"); const PayloadSources = { VIEW: "view", SERVER: "server" }; AppDispatcher = new flux.Dispatcher(); AppDispatcher.dispatchViewAction = function (action) { action.source = PayloadSources.VIEW; this.dispatch(action); }; AppDispatcher.dispatchServerAction = function (action) { action.source = PayloadSources.SERVER; this.dispatch(action); }; module.exports = { AppDispatcher: AppDispatcher };