$30 off During Our Annual Pro Sale. View Details »

Node Workshop: NorfolkJS Edition

Node Workshop: NorfolkJS Edition

An intro to Node.js

Given at NorfolkJS

Jason Rhodes

April 25, 2016
Tweet

More Decks by Jason Rhodes

Other Decks in Programming

Transcript

  1. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  2. hi

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. .com

  10. .com First Wednesdays, 7pm AOL Building in Brewer’s Hill After

    party at a nearby bar
  11. None
  12. None
  13. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  14. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  15. —Henry David Thoreau To be great is to be misunderstood.

  16. None
  17. JavaScript, aka Mocha, aka LiveScript, aka JScript, aka ECMAScript, is

    one of the world's most popular programming languages. “
  18. None
  19. Studies show that a todo list is the most complex

    JavaScript app you can build before a newer, better framework is invented. —Allen Pike, A JS framework on every table “
  20. None
  21. None
  22. None
  23. An episode of Family Guy takes about 9 months

  24. None
  25. A batch of Bud Light Lime Apple-Ahhh-Rita takes about 30

    inexplicable days ®
  26. None
  27. JavaScript was created in 10 days

  28. DON’T EVEN WORRY ABOUT IT

  29. But WHY is it called JAVA scr— IT JUST IS!

  30. None
  31. None
  32. nodejs is JAVA- SCRIPT

  33. None
  34. (that’s really all it is)

  35. None
  36. You already learned it.

  37. None
  38. None
  39. Transmissions API Metrics API Message Events API Templates API Accounts

    API
  40. cli tools?

  41. nuclear pizza machine only with fresh ingredients

  42. None
  43. None
  44. None
  45. None
  46. None
  47. technically, Bower’s not… JUST USE NPM!!1!

  48. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  49. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  50. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  51. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  52. None
  53. BYE BYE, DOM

  54. window document

  55. node globals • require • console • process • module

  56. (function() { })();

  57. EVERY FILE HAS ITS OWN LOCAL SCOPE

  58. var foo = require(“foo”); Not global!

  59. var foo = require(“foo”); /app/index.js

  60. var foo = require(“foo”); /app/foo.js /app/index.js

  61. var foo = require(“foo”); /app/foo.js /app/index.js module.exports = function foo()

    { console.log(‘a foo!’); };
  62. var foo = require(“./foo”); /app/foo.js /app/index.js module.exports = function foo()

    { console.log(‘a foo!’); };
  63. Any questions?

  64. None
  65. 1. Learning

  66. 2. Collaboration

  67. None
  68. David: Not forcing the pair- programming. I’d like to …

    make a few attempts at a solution on my own first. Just the way my brain works.
  69. None
  70. None
  71. None
  72. rewire (gently)

  73. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  74. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  75. Node.js workshop » ABOUT JASON » WHY ARE YOU HERE

    » WTF IS NODE » JS BE CRAZY » NODE DIFF » WTF IS NODESCHOOL » LETS LEARN SOME NODE ------------------------------------------- ------------------------------------------- HELP EXIT
  76. PAIR UP!

  77. COMMAND LINE

  78. $ node -v

  79. $ npm -v

  80. $ npm i learnyounode -g

  81. $ learnyounode

  82. $ alias lyn=learnyounode