How to pipe a stream to module