Skip to content

Commit

Permalink
[dist] Added http-server based server and package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Aug 3, 2012
1 parent 3bd5b8f commit ccafba4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bin/server
@@ -0,0 +1,19 @@
#!/usr/bin/env node

var httpServer = require('http-server'),
path = require('path');

var port = 8000,
host = '0.0.0.0',
root = path.resolve(__dirname, '../public');

var server = httpServer.createServer({
root: root,
autoIndex: false,
cache: true
});

server.listen(port, host, function () {
console.log(root);
console.log('Now hosting the handbook on http://%s:%s', host, port);
});
18 changes: 18 additions & 0 deletions package.json
@@ -0,0 +1,18 @@
{
"author": "Nodejitsu <support@nodejitsu.com> (http://nodejitsu.com)",
"name": "handbook",
"description": "A gentle introduction to the art of nodejitsu",
"version": "0.1.0",
"homepage": "http://handbook.jit.su",
"repository": {
"type": "git",
"url": "git://github.com/nodejitsu/handbook.git"
},
"dependencies": {
"http-server": "~0.5.1"
},
"scripts": {
"install": "make",
"start": "node ./bin/server"
}
}

0 comments on commit ccafba4

Please sign in to comment.