This is an example of a simple Node/Express server that generates a token for Agora applications.
Install the dependencies
npm installStart the service
npm startThe endpoint generates a token uisng: channelName (String) , the uid (Int), and a role ('subscriber' or 'publisher').
(optional) Pass expirationTime (integer) to represent the token lifetime in seconds.
endpoint structure
?channelName=&uid=&role=&expireTime=
response:
{"token":" "}