catch-all node server function plus online/offline handlers added