How to make a turn server on node.js for peer connection

9.9k views Asked by At

I'm using a node.js server to send iceCandidates and connect two computers by peer connection (javascript). I want to use TURN-server as iceServer, but I don't have one, so I want to make TURN-server on my server. How is it possible?

1

There are 1 answers

1
Alexandre Tiertant On

you can use node-turn to write your own server or using it as a standalone server.

var Turn = require('node-turn');
var server = new Turn({
  // set options
  authMech: 'long-term',
  credentials: {
    username: "password"
  }
});
server.start();