Best way to make node.js executable with nvm

I am using nvm to control my node versions. My node.js executables were used as if ta> t20>, but now it seems to me that I should do something like #! /Users/<userName>/.nvm/versions/node/v6.3.1/bin/node #! /Users/<userName>/.nvm/versions/node/v6.3.1/bin/node to do the same thing.

What is the best way to handle this?

+5
source share
1 answer

I am using #!/usr/bin/env node in my node executable and it seems to work. There is a link here https://en.wikipedia.org/wiki/Shebang_(Unix)#Portability

+2
source

All Articles