O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Web server application

The web server application forms a fully-fledged Node.js application written in a single file for ease of instruction and illustration here.

The built-in Node.js HTTP module is used to implement the web server, and socket.io integrates into the web server in order to catch some URLs. In particular it will capture URLs to the path /socket.io/ in order to deliver the extra payload to the client to help with the task of achieving real-time communication with the various web technologies.

Like all Node.js applications, this one sits in an event loop waiting for I/O or events and responding with prescribed handling functions. Cataloging the events and their programmed responses can be insightful for understanding the operation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required