http-server
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -49,2 +49,3 @@ 'use strict'; | ||
this.autoIndex = options.autoIndex !== 'false'; | ||
this.gzip = options.gzip === true; | ||
this.contentType = options.contentType || 'application/octet-stream'; | ||
@@ -101,2 +102,3 @@ | ||
defaultExt: this.ext, | ||
gzip: this.gzip, | ||
contentType: this.contentType, | ||
@@ -103,0 +105,0 @@ handleError: typeof options.proxy !== 'string' |
{ | ||
"name": "http-server", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "A simple zero-configuration command-line http server", | ||
@@ -58,2 +58,6 @@ "main": "./lib/http-server", | ||
"email": "master@bdyne.net" | ||
}, | ||
{ | ||
"name": "BigBlueHat", | ||
"email": "byoung@bigbluehat.com" | ||
} | ||
@@ -64,7 +68,7 @@ ], | ||
"corser": "~2.0.0", | ||
"ecstatic": "^1.4.0", | ||
"ecstatic": "^2.0.0", | ||
"http-proxy": "^1.8.1", | ||
"opener": "~1.4.0", | ||
"optimist": "0.6.x", | ||
"portfinder": "0.4.x", | ||
"portfinder": "^1.0.13", | ||
"union": "~0.4.3" | ||
@@ -71,0 +75,0 @@ }, |
@@ -0,1 +1,6 @@ | ||
[![build status](https://img.shields.io/travis/indexzero/http-server.svg?style=flat-square)](https://travis-ci.org/indexzero/http-server) | ||
[![dependencies status](https://img.shields.io/david/indexzero/http-server.svg?style=flat-square)](https://david-dm.org/indexzero/http-server) | ||
[![npm](https://img.shields.io/npm/v/http-server.svg?style=flat-square)](https://www.npmjs.com/package/http-server) | ||
[![license](https://img.shields.io/github/license/indexzero/http-server.svg?style=flat-square)](https://github.com/indexzero/http-server) | ||
# http-server: a command-line http server | ||
@@ -21,16 +26,2 @@ | ||
# Installing as a node app | ||
mkdir myapp | ||
cd myapp/ | ||
jitsu install http-server | ||
*If you do not have `jitsu` installed you can install it via `npm install jitsu -g`* | ||
## Usage | ||
### Starting http-server locally | ||
node bin/http-server | ||
*Now you can visit http://localhost:8080 to view your server* | ||
@@ -48,2 +39,4 @@ | ||
`-g` or `--gzip` When enabled (defaults to 'False') it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. | ||
`-e` or `--ext` Default file extension if none supplied (defaults to 'html') | ||
@@ -72,1 +65,15 @@ | ||
`-h` or `--help` Print this list and exit. | ||
# Development | ||
Checkout this repository locally, then: | ||
```sh | ||
$ npm i | ||
$ node bin/http-server | ||
``` | ||
*Now you can visit http://localhost:8080 to view your server* | ||
You should see the turtle image in the screenshot above hosted at that URL. See | ||
the `./public` folder for demo content. |
@@ -92,3 +92,3 @@ var assert = require('assert'), | ||
}, | ||
'status code should be the enpoint code 200': function (res) { | ||
'status code should be the endpoint code 200': function (res) { | ||
assert.equal(res.statusCode, 200); | ||
@@ -112,3 +112,3 @@ }, | ||
}, | ||
'status code should be the enpoint code 200': function (res) { | ||
'status code should be the endpoint code 200': function (res) { | ||
assert.equal(res.statusCode, 200); | ||
@@ -115,0 +115,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
492712
273
77
2
+ Addedasync@2.6.4(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedecstatic@2.2.2(transitive)
+ Addedhe@1.2.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedms@2.1.3(transitive)
+ Addedportfinder@1.0.32(transitive)
+ Addedurl-join@2.0.5(transitive)
- Removedasync@0.9.0(transitive)
- Removedecstatic@1.4.1(transitive)
- Removedhe@0.5.0(transitive)
- Removedportfinder@0.4.0(transitive)
- Removedurl-join@1.1.0(transitive)
Updatedecstatic@^2.0.0
Updatedportfinder@^1.0.13