SyntaxFix
Write A Post
Hire A Developer
Questions
You can use a shebang file :
script.js
#!/usr/bin/env node console.log('Hello terminal');
And run it
./script.js
Don't forget to chmod +x script.js
chmod +x script.js