node.js express socket.io port 3000 in use

后端 未结 8 447
南笙
南笙 2021-02-02 16:33

I\'ve been following this(http://socket.io/get-started/chat/) tutorial on how to make a simple chat application using socket.io.

I tried to however use Express to create

8条回答
  •  余生分开走
    2021-02-02 17:06

    I resolved the same problem with an express app doing this:

    1. Edit the file "yourap/bin/www"
    2. find the line :

      var port = normalizePort(process.env.PORT || '3000');

    3. replace it by:

      var port = normalizePort('XXXX');

    where XXXX is the port number you want to use

    Then youre free to do npm start! xD

提交回复
热议问题