node-examples
node-examples copied to clipboard
Minor update and fix
Thanks for writing this example! I found it works well for read-only TFTP. For read-write TFTP I found danabr/node-tftp useful.
These are a few minor changes I made which you might consider:
- Package 'sys' renamed to 'util' (more recent versions of nodejs suggest this).
- SERVER_HOST changed to '0.0.0.0' as '127.0.0.1' was only accepting inbound TFTP connections via the loopback interface. Using '0.0.0.0' as the host binds to any/all network interfaces.
- SERVER_PORT changed to well known TFTP port number 69. Run node as Administrator (Windows) or root (*nix) to be allowed to bind to this port.
Cheers Greg