net

load net module which lets us connect on a port that the server is listening and we connect at the 60300 port

net

on

The client on receiving a data chunk parses it to a message as a JSON type object

on

log

If the message type of the json type message is watching then print on console the file that is being watcher

log

log

If the message type of the json type message is changed then it gets the date(timestamp) of the message and print when the file changed

log

log

In other case the type of the message is not known and it prints the message type

log