We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node.js read stdin synchronous
I tested above async read process.stdin. in case code, echo 'hello world' | node stdin.js work correct.
echo 'hello world' | node stdin.js
but with websocketd --port 8058 ./mock3.js read std empty.
websocketd --port 8058 ./mock3.js
(async function () { const input = await readStdinSync(); setInterval(() => { process.stdout.write(JSON.stringify({ now: +new Date(), text: data.trim() }) + '\n'); }, (3000)); })()
The text was updated successfully, but these errors were encountered:
node -v v18.17.0
Sorry, something went wrong.
No branches or pull requests
Node.js read stdin synchronous
I tested above async read process.stdin.
in case code,
echo 'hello world' | node stdin.js
work correct.but with
websocketd --port 8058 ./mock3.js
read std empty.The text was updated successfully, but these errors were encountered: