Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js Lab

Node.js Lab

Node.js Lab
http://leonguyen.com

LeoNguyen.com

March 28, 2014
Tweet

More Decks by LeoNguyen.com

Other Decks in Programming

Transcript

  1. Outline - Install Node.js on Windows - Install Node.js on

    Linux - Write a Hello Console - Write a Hello HTTP - Write a Hello TCP - Write a Hello UDP
  2. Task 1 - On Windows - Goto Node.js download site

    nodejs.org/download (See: youtu. be/n9cs8Bmb6KU) - Check version: using command node -v (See: youtu.be/-hZ9-qkxxOc)
  3. Task 1 - On Linux - Install on Ubuntu (See:

    youtu.be/8widdkdSo58) - Install on CentOS (See: youtu.be/bPObquO4FCM) - Check version: using command node -v (See: youtu.be/-hZ9-qkxxOc)
  4. Task 4 - Run UDP Client - Using command: node

    client-hello-udp.js (See: youtu. be/syyp0TWQd4U)
  5. Task 1 - Create package.json - Check NPM: using command

    npm -v (See: youtu.be/_x3EzBCBd_o) - Enter code: https://gist.github.com/leonguyen/6504935
  6. Task 2 - Install Express.js - Install Express: using command

    npm install (See: youtu. be/umjcT1sH22Q) or npm install -g express (for available from anywhere) - Check Express: using command express --version (See: youtu. be/a8H41rePUJM)
  7. Task 1 - Generate an application - Using command express

    --sessions --css stylus --ejs [nodeapp] (See: youtu.be/7QMhdISI-7s)
  8. Task 1 - Install MySQL - Using command npm install

    mysql See: youtu.be/uEWKuQQiPVs, youtu.be/CB80P8_i7gg (CentOS)