Skip to content

KnowJS/day-two

Repository files navigation

Node.js for Devs - Getting Dangerous Fast!


##Day 2 - Building Up Strong


###10am - 10:50am : Recap from Day 1

  • Recap
    • JavaScript, node, npm, modules,
  • Gel some ideas together, including how npm includes 3rd party modules
  • Problem: Refactor code to resize images into separate module and separate repo in github. Update app to include it via package.json via tarball link

###10 min break


###11:00am - 11:30am : Running our Apps and Associated Tasks

  • npm [script]
  • make (posix only)
  • npm home grunt
  • npm home gulp
  • ... Node.js scripts!
  • Problem: Add a Makefile, create a 'start' target, and export environment variables needed to interact with github
    • bonus: Add a gulpfile.js and task to minify your css and output to a build folder

###10 min break


###11:40pm - 12:15pm : Configuration

  • config files
    • npm home nconf
    • npm home config-node
  • environment variables
    • process.env
  • command line parameters
    • npm home minimist
  • Problem: Add a config.json file and configure your app to use it to pass in env vars required by passport-github
    • bonus: Add ability to override config via command line arguments and/or environment variables
  • Pro Tip: Best solution cascades between env-dependent config files, to environment variables, overidable by command options.
  • Pro Tip: Flexibility of Makefile(s)
    • allows multiple layers of compositing and overriding env vars

###12:15pm - 1:15pm : Lunch

  • lunchtime tip:
    • ES6 let operator and impact on variable scope
    • ES6 generators and impact on async operations

###1:15pm - 2:00pm : Logging & Exception Handling



###10 min break


###2:10pm - 2:30pm: Code Analysis

  • npm home jshint
  • npm home jscs
  • Problem: Add a linting task to your Makefile or npm scripts section, calling jshint and jscs, and fix the errors and warnings provided
    • bonus: add a jshint and jscs step to your gruntfile.js

###10 min break


###2:40pm - 3:20pm: Testing

  • npm home mocha (mention jasmine and others)
  • npm home should
  • npm home sinon
  • Problem: Add a mocha test to your module that mocks out calls to 'gm', but ensures that the calls are made.

###10 min break


###3:30pm - 4:10pm: Standing on Shoulders and Bootstrapping


###10 min break


###4:20 - 5:00pm: Node Style Modules on the Client and Code Reuse

  • npm home browserify
  • json rpc using:
    • npm home dnode
    • npm home shoe
  • Problem: Add means of browserifying your client side code via bash in Makefile or npm scripts, or as a task in grunt or gulp.
    • Bonus: Create a means of logging errors from the client to the server.

###10 min break


###(Stretch) 5:10 - 6:00pm: Functional Testing


###Day End Questions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published