Liquid, JavaScript, themes, sales channels
Hello!
I'm trying to create a Theme App Extension and for that I would use Socket IO for the websocket functions. However, I am not able to connect, I had an old project that worked as shown in the code below.
Error in my attempts:
Code used trying connect the Socket IO
import { io } from "https://cdn.socket.io/4.5.4/socket.io.esm.min.js";
const ws = new WebSocket('ws://localhost:8081')
const socket = io(ws, { transports: ['websocket'] });
socket.on("connect_error", (err) => {
console.log(`connect_error due to ${err.message}`);
});
Could anyone help me with this? Or let me know if Socket IO is still used in these cases? Thanks!
User | RANK |
---|---|
24 | |
23 | |
12 | |
9 | |
8 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023