Guest User

Untitled

a guest
May 27th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. var sys = require('sys'),
  2. path = require('path'),
  3. squeenote = require('./node-lib/squeenote');
  4.  
  5. // Perform boot setup with defaults
  6. var presentation_path = "index.html"; // This is the HTML file from which Squeenote will be presenting.
  7. var presenter_password = "bling-bling"; // This is the default password allowing the presenter controls to be used.
  8. var port = 8080; // The port at which the Squeenote server will listen for requests.
  9.  
  10. // Parse commandline arguments
  11. for(var i=0; i<process.argv.length; i++) {
  12. // is this a flag, and is the next item a valid argument?
  13. flag = process.argv[i]; arg = process.argv[i+1];
  14. if(flag.indexOf("-") == 0 && arg && arg.indexOf("-") != 0) {
  15. switch(process.argv[i]) {
  16. case "-p":
  17. presenter_password = arg;
  18. break;
  19. case "-f":
  20. presentation_path = arg;
  21. break;
  22. case "-P":
  23. port = parseInt(arg);
  24. break;
  25. }
  26. }
  27. }
  28.  
  29. squeenote.listen(presentation_path, presenter_password, port);
  30. return;
Add Comment
Please, Sign In to add comment