Created
April 23, 2019 12:50
-
-
Save fukaoi/19e22e0e607e4c2b5512495a99f4fc97 to your computer and use it in GitHub Desktop.
node.js to crystal named pipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exec = require('child_process').exec; | |
var obj = { | |
"name":"太郎", | |
"age": 30, | |
"area":"Tokyo" | |
} | |
const json = JSON.stringify(JSON.stringify( obj )); | |
console.log(json) | |
exec("echo " + json + " > ~/Work/hogepipe", function(err, stdout, stderr){ | |
console.log(stdout) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment