Permalink
Browse files

express app example

  • Loading branch information...
1 parent e110674 commit 2c89cb16d1699e2a903eb19be6785e1ccf331e00 @tblobaum committed Jul 18, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 example/express.js
View
@@ -0,0 +1,17 @@
+
+var express = require('express')
+ , tracker = require('../')
+ , app = express.createServer()
+
+app.configure(function () {
+ app.use(express.cookieParser())
+})
+
+tracker
+ .use(function (error, result) {
+ console.log(JSON.stringify(result, null, 2))
+ })
+
+app.all('/pixel', tracker.middleware)
+
+app.listen(process.argv[2] || 3000)

0 comments on commit 2c89cb1

Please sign in to comment.