Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[dist] Added http-server based server and package.json

  • Loading branch information...
commit ccafba4ee58f1e6d509535ec22359ef99251e82a 1 parent 3bd5b8f
Joshua Holbrook jfhbrook authored
Showing with 37 additions and 0 deletions.
  1. +19 −0 bin/server
  2. +18 −0 package.json
19 bin/server
View
@@ -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 package.json
View
@@ -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"
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.