could someone help me understand the difference between running a node script from terminal using ./ [Filename] versus running it with node [filename] ?
Thank you very much.
It's the same as running bash script using ./[Filename] or bash [Filename].
To use ./[Filename] syntax your node script should:
chmod +x [Filename])#!/usr/bin/node or #!/usr/bin/env node)There is no requirements for running your script with node [Filename].