

Show HN: A golang websocket server you can pipe to - minikomi
https://github.com/minikomi/pipesock

======
codebeaker
So no installation instructions, the ones here don't work (it's not compiled),
and it doesn't seem to work (tailing a log file that is receiving new content
once per second `while true.... date > mylog; done` - /buffer.json always
empty, /flush does nothing except echo "Flushed" and the web interface
apparently does nothing...

~~~
codebeaker
Also, there's a problem:

> cat /usr/share/dict/words | ./pipesock 2013/06/01 22:35:59 Read Line Error:
> EOF 2013/06/01 22:35:59 Read Line Error: EOF 2013/06/01 22:35:59 Read Line
> Error: EOF 2013/06/01 22:35:59 Read Line Error: EOF

This happened when trying to do "y | ./pipesock", amongst other things,
perhaps you should silently ignore stuff that isn't streaming in line-based.

FWIW the websocket library now installed, I get a single reading in the html
frontend, the first message I broadcast.

Nice idea, needs a lot more work!

~~~
minikomi
Thank you very much for trying it out and, I agree, I have a lot more work to
do. As always, the devil's in the details - and having those details pointed
out is a great way to move forward!

------
mseepgood
go get github.com/minikomi/pipesock

ln -s $GOPATH/src/github.com/minikomi/pipesock/default ~/.pipesock

~~~
minikomi
Ah, thanks. You might also need to go get code.google.com/p/go.net/websocket
if you haven't already.

~~~
shakesbeard
You could use the following to get the path to your assets.

    
    
        import (
            "go/build"
            "path/filepath"
        )
        
        pkgInfo, err := build.Import("github.com/minikomi/pipesock", "", 0)
        if err != nil {
            panic(err)
        }
        webDirPath := filepath.Join(pkgInfo.Dir, "default")

~~~
minikomi
That's a much cleaner idea, thanks. I'll investigate it. edit: Thanks, I went
with this.

