Glavin001 / smucs

Saint Mary's University Computer Science @
http://140.184.132.237
MIT License
1 stars 0 forks source link

app.js should support arguments #13

Closed Glavin001 closed 10 years ago

Glavin001 commented 10 years ago

See http://stackoverflow.com/a/4351548/2578205 Sample Node.js code:

// print process.argv
process.argv.forEach(function (val, index, array) {
  console.log(index + ': ' + val);
});

Sample usage: node app -p 80 Results in

0: node
1: /Users/glavin/Documents/Project Dev/smucs/app
2: -p
3: 80
Express server listening on port 8080
connected to database :: node-login