Be sure and use 'get' or 'post' consistantly with your $.ajax call for example.
$.ajax({
type: 'get',
must be met with
app.get('/', function(req, res) {
=============== and for post
$.ajax({ type: 'post',
must be met with
app.post('/', function(req, res) {