mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: add path to socket connection
This commit is contained in:
@@ -86,7 +86,7 @@ export default ({ app }) => {
|
||||
################################################
|
||||
`);
|
||||
});
|
||||
const io = new Server(server, {});
|
||||
const io = new Server(server, { path: '/socket' });
|
||||
|
||||
// Set socket.io listeners.
|
||||
io.on('connection', (socket) => {
|
||||
|
||||
@@ -10,8 +10,8 @@ export function DashboardSockets() {
|
||||
const client = useQueryClient();
|
||||
|
||||
useEffect(() => {
|
||||
socket.current = io('ws://localhost:4000');
|
||||
|
||||
socket.current = io('/', { path: '/socket' });
|
||||
|
||||
socket.current.on('NEW_TRANSACTIONS_DATA', () => {
|
||||
client.invalidateQueries(t.ACCOUNTS);
|
||||
client.invalidateQueries(t.ACCOUNT_TRANSACTION);
|
||||
|
||||
Reference in New Issue
Block a user