Socket
Socket
Sign inDemoInstall

http-server

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-server - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

2

lib/http-server.js

@@ -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'

10

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc