🔧 Changes to support BullMQ on the service layer
1. Removed socket connection from context 2. Added Redux middleware to persist socket connection 3. Removed amqplib and RabbitMQ support 4. Removed RabbitMQ from docker-compose configuration 5. Removed a proxy route to IMS from the facade 6. Refactored file actions to support the new way of socket event emitting and listening
This commit is contained in:
@@ -3,16 +3,20 @@ import { createStore, applyMiddleware, compose } from "redux";
|
||||
import { createBrowserHistory } from "history";
|
||||
import thunk from "redux-thunk";
|
||||
import createRootReducer from "../reducers";
|
||||
import socketIO from "socket.io-client";
|
||||
import socketIoMiddleware from "redux-socket.io-middleware";
|
||||
|
||||
const io = socketIO(`http://localhost:3001`);
|
||||
export const history = createBrowserHistory();
|
||||
export default function configureStore(initialState) {
|
||||
const configureStore = (initialState) => {
|
||||
const store = createStore(
|
||||
createRootReducer(history),
|
||||
initialState,
|
||||
compose(
|
||||
applyMiddleware(thunk, routerMiddleware(history)),
|
||||
applyMiddleware(socketIoMiddleware(io), thunk, routerMiddleware(history)),
|
||||
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
|
||||
),
|
||||
);
|
||||
return store;
|
||||
}
|
||||
};
|
||||
export default configureStore;
|
||||
|
||||
Reference in New Issue
Block a user