Skip to content

Commit

Permalink
Merge branch 'master' of github.com:walmartlabs/hapi into pack
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Feb 19, 2013
2 parents 2d6a941 + 29426c1 commit 8d455c1
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ config.json
*/*/._*
coverage.*
lib-cov

complexity.md
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ test-cov:
test-cov-html:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --ignore-leaks --timeout 3000 -R html-cov > coverage.html

complexity:
./node_modules/.bin/cr -o complexity.md -f markdown lib

.PHONY: test test-cov test-cov-html
Binary file added examples/favicon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions examples/favicon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Example serves a favicon.ico file that is cached on the client for a day

// Load modules

var Hapi = require('../lib');


// Declare internals

var internals = {};


internals.main = function () {

var http = new Hapi.Server(8080);

http.route([
{ method: 'GET', path: '/favicon.ico', handler: { file: './favicon.ico' }, config: { cache: { mode: 'client', expiresIn: 86400000, privacy: 'public' } } }
]);

http.start();
};


internals.main();

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"handlebars": "1.0.x",
"jade": "0.28.x",
"blanket": "1.0.x",
"travis-cov": "0.2.x"
"travis-cov": "0.2.x",
"complexity-report": "0.x.x"
},
"scripts": {
"test": "make test && make test-cov",
Expand Down

0 comments on commit 8d455c1

Please sign in to comment.