Socket
Socket
Sign inDemoInstall

ecstatic

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecstatic - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

2019/04/15 Version 4.1.0
- Add ability to set the host in cli mode
2019/04/14 Version 4.0.2

@@ -2,0 +5,0 @@ - Add dependency for is-finished library

@@ -72,1 +72,2 @@ General format is: contributor, github handle, email. In some cases, the

* Robert Nagy @ronag <ronagy@icloud.com>
* Ji WenCong <taiki_akita@163.com>

8

lib/bin.js

@@ -21,2 +21,3 @@ #!/usr/bin/env node

const port = envPORT > 1024 && envPORT <= 65536 ? envPORT : opts.port || opts.p || 8000;
const host = process.env.HOST || opts.host || '0.0.0.0';
const dir = opts.root || opts._[0] || process.cwd();

@@ -28,7 +29,8 @@

} else {
http.createServer(ecstatic(dir, opts))
.listen(port, () => {
console.log(`ecstatic serving ${dir} at http://0.0.0.0:${port}`);
const server = http.createServer(ecstatic(dir, opts))
.listen(port, host, () => {
const bind = server.address();
console.log(`ecstatic serving ${dir} at http://${bind.address}:${bind.port}`);
})
;
}

@@ -5,3 +5,3 @@ {

"description": "A simple static file server middleware",
"version": "4.0.2",
"version": "4.1.0",
"homepage": "https://github.com/jfhbrook/node-ecstatic",

@@ -8,0 +8,0 @@ "repository": {

@@ -124,2 +124,9 @@ # Ecstatic [![build status](https://secure.travis-ci.org/jfhbrook/node-ecstatic.png)](http://travis-ci.org/jfhbrook/node-ecstatic) [![codecov.io](https://codecov.io/github/jfhbrook/node-ecstatic/coverage.svg?branch=master)](https://codecov.io/github/jfhbrook/node-ecstatic?branch=master)

### `opts.host`
### `--host {host}`
In CLI mode, `opts.host` is the host you want ecstatic to listen to. Defaults
to 0.0.0.0. This can be overridden with the `--host` flag or with the HOST
environment variable.
### `opts.port`

@@ -126,0 +133,0 @@ ### `--port {port}`

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