Skip to content

Instantly share code, notes, and snippets.

@fukaoi
Created April 23, 2019 12:51
Show Gist options
  • Save fukaoi/b3eebcb208cb0cbe2bcc8c700d5b7af9 to your computer and use it in GitHub Desktop.
Save fukaoi/b3eebcb208cb0cbe2bcc8c700d5b7af9 to your computer and use it in GitHub Desktop.
node.js to crystal named pipe
require "io"
require "json"
io = IO::Memory.new
Process.run("cat ~/Work/hogepipe", shell: true, output: io)
p data = io.to_s.chomp
p JSON.parse(data)["name"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment