No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    ssr with socket io

    Framework
    2
    2
    201
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sarpedon last edited by

      Hi there! i am using SSR mode, and i was wondering how to initialize web socket server on my server. i have modified extension.js as below:

      module.exports.extendApp = function ({app, ssr}) {
          const server = http.createServer(app)
          const io = socketIO(server)
      
      
          io.on('connection', (socket) => {
           //... 
          }
      }
      

      which does not work, it only works if i add this line to extension.js:

      server.listen(3000)
      

      but this is a bad idea, because anytime i made changes to this file, my dev server crashes and it is normal behaviour.

      what do you guys suggest?
      thanks!

      E 1 Reply Last reply Reply Quote 0
      • E
        enrychemp @sarpedon last edited by

        @sarpedon said in ssr with socket io:

        because anytime i made changes

        same issue

        1 Reply Last reply Reply Quote 0
        • First post
          Last post