This is an old revision of the document!
* Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. * Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. * RADIUSdesk uses Node.js because of its support for Websocket. Websocket is a technology that is supported by the latest versions of all the major browsers which allow you to display data in real-time. * We will make use of Socket.IO as a wrapper to Websocket which runs on Node.js to read FreeRADIUS log file and debug output of FreeRADIUS in real-time. * To Summarize: Node.js → Websocket → Soket.IO → Client.
sudo apt-get update sudo apt-get install nodejs npm
sudo npm -g install tail connect mysql forever socket.io@0.9.x
#The systemd startup file sudo cp /usr/share/nginx/html/cake2/rd_cake/Setup/Node.js/nodejs-socket-io.service /lib/systemd/system/ # add a sym link to node sudo ln -s /usr/bin/nodejs /usr/bin/node #Enable it sudo systemctl enable nodejs-socket-io.service #Start it sudo systemctl start nodejs-socket-io.service
sudo cat /var/log/nodejs-socket-io.log #Result in.... info: socket.io started Up and running on port 8000