Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
createServer method
Browse files Browse the repository at this point in the history
  • Loading branch information
mvrilo committed Dec 10, 2011
1 parent 28398bb commit 3eec506
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions examples/hello-world.js
@@ -1,5 +1,4 @@
var frank = require('../lib/frank'),
server = frank();
var http = require('../lib/frank').createServer();

server.get('/').send('not so minimal api ftw too');
server.listen(8000)
http.get('/').send('not so minimal api ftw too');
http.listen(8000);
3 changes: 2 additions & 1 deletion lib/frank.js
Expand Up @@ -10,7 +10,8 @@ function frank() {

frank.fn = frank.prototype;
frank.fn.__proto__ = merge(request, response);
module.exports = exports.createServer = frank;
frank.createServer = frank;
module.exports = frank;

'get post put head'.split(' ').forEach(function(method) {
frank.fn[method] = function(path, fn) {
Expand Down

0 comments on commit 3eec506

Please sign in to comment.