Created
February 6, 2011 23:05
-
-
Save niftydigits/813805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var ArticleProvider = require('./articleprovider-memory').ArticleProvider; | |
var app = express.createServer(); | |
app.configure(function(){ | |
app.use(express.methodOverride()); | |
app.use(express.bodyDecoder()); | |
app.use(express.logger()); | |
}); | |
var articleProvider= new ArticleProvider(); | |
app.get('/', function(req, res){ | |
articleProvider.findAll(function(error, docs){ | |
res.send(require('sys').inspect(docs)); | |
}) | |
}); | |
app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment