how to create and run my own peerjs server?

后端 未结 4 2093
野性不改
野性不改 2020-12-29 14:06

I got the following code from the git-hub but I don\'t know how to use and execute.

 $> npm install peer   --->where i want to install this node_module         


        
4条回答
  •  执笔经年
    2020-12-29 14:33

    There are few ways to get peerjs-server:

    1. npm install peer

    2. git clone https://github.com/peers/peerjs-server

    3. download and unpack zip-file from git

    After that go to /bin and run peerjs-server with command:

    node peerjs --port 9000 --key peerjs
    

    or

    ./peerjs --port 9000 --key peerjs
    

    peerjs-server has more options, and you can see them with command ./peerjs without arguments.

提交回复
热议问题