Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add socket connection to portal
  • Loading branch information
mett-development committed Apr 10, 2022
1 parent 0873d73 commit 3985cb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/portal/quasar.config.js
Expand Up @@ -27,7 +27,7 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-vite/boot-files
boot: [],
boot: ['socket'],

// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],
Expand Down
10 changes: 10 additions & 0 deletions packages/portal/src/boot/socket.ts
@@ -0,0 +1,10 @@
import { boot } from 'quasar/wrappers';
import io from 'socket.io-client';

export default boot(({}) => {
const URL = 'http://localhost:5000';
const socket = io(URL);
socket.onAny((event, ...args) => {
console.log(event, args);
});
});

0 comments on commit 3985cb5

Please sign in to comment.