Skip to content

Instantly share code, notes, and snippets.

@taterbase
Created July 21, 2012 05:01
Show Gist options
  • Star 48 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save taterbase/3154646 to your computer and use it in GitHub Desktop.
Save taterbase/3154646 to your computer and use it in GitHub Desktop.
System Beep in Node.js
function alertTerminal(){
console.log("\007");
}
@StasNemy
Copy link

StasNemy commented Apr 5, 2024

windows or wsl

require("child_process").exec("powershell.exe [console]::beep(500,600)");

Mac

require("child_process").exec("afplay /System/Library/Sounds/Glass.aiff");

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment