2016-10-03 15:22:15 +13:00
|
|
|
|
|
|
|
|
console.info('Bootstrapping...');
|
|
|
|
|
|
2016-10-16 12:37:37 +13:00
|
|
|
import { createStore, applyMiddleware, combineReducers } from 'redux'
|
|
|
|
|
|
|
|
|
|
import mopidy from './services/mopidy/reducer'
|
|
|
|
|
import spotify from './services/spotify/reducer'
|
|
|
|
|
|
2016-10-14 22:42:45 +13:00
|
|
|
import thunk from 'redux-thunk'
|
|
|
|
|
import mopidyMiddleware from './services/mopidy/middleware'
|
2016-10-16 12:37:37 +13:00
|
|
|
import spotifyMiddleware from './services/spotify/middleware'
|
|
|
|
|
|
|
|
|
|
let reducers = combineReducers({
|
|
|
|
|
mopidy,
|
|
|
|
|
spotify
|
|
|
|
|
});
|
2016-10-03 15:22:15 +13:00
|
|
|
|
2016-10-14 22:42:45 +13:00
|
|
|
let store = createStore(
|
2016-10-16 12:37:37 +13:00
|
|
|
reducers,
|
2016-10-14 22:42:45 +13:00
|
|
|
{},
|
2016-10-16 12:37:37 +13:00
|
|
|
applyMiddleware( thunk, mopidyMiddleware, spotifyMiddleware )
|
2016-10-14 22:42:45 +13:00
|
|
|
);
|
2016-10-03 16:55:33 +13:00
|
|
|
|
2016-10-03 15:22:15 +13:00
|
|
|
export default store;
|