handling different Http methods in node.js (273 Lab 2)