All the solutions I've found simply poll a service. E.g. they ping google.com every second to see if the Node service has Internet access.
However, I'm looking for a cleaner event-based solution. In the browser, there's window.ononline and window.onoffline. I know these aren't perfect, but they're still better than nothing.
I'm not necessarily looking for a way to see if a Node service is online, I'm just looking for a way to see if the OS thinks it's online. E.g. if the OS isn't connected to any network interfaces, then it's definitely offline. However, if it's connected to a router, then I can maybe ping google.com.