Reputation: 32635
Can you run a node.js script:
node app.js --watch ../worker/storage/work
like this?
app --watch ../worker/storage/work
Upvotes: 4
Views: 1181
Reputation: 43526
Add #!/path/to/your/node
at the first line of your js file.
Then run:
chmod +x yourFileName
to add execute permission to your script.
At last run your file like this:
./app.js
Upvotes: 2
Reputation: 5798
One way this could work is by creating an alias in your shell. Edit your ~/.bashrc
file and add the following line:
alias app="node app.js"
More details on how to create a permanent alias: https://askubuntu.com/questions/1414/how-to-create-a-permanent-alias
Upvotes: 2