Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
31 Views

/createToken 404 error in basic example

Hello..

I got the 404 error when I tried to consume /createToken...

In the code:

app.post('/createToken/', function(req, res) {
  var room = req.body.room || myRoom,
    username = req.body.username,
    role = req.body.role;
  N.API.createToken(room, username, role, function(token) {
    res.send(token);
  }, function(err) {
    res.send(err);
  });
});

The N.API never returns the token...it always returns an error.

First I installed  the MCU server following the instruction for CentOS 7. I'm working with SSL certification and I copied the certificate into the ./cert folder and I run the initcert.js. Then I started the services and the example.

Any suggets?

Regards...

 

 

 

Tags (2)
0 Kudos
0 Replies