Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

echoecho

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echoecho - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

9

package.json

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

"author": "Dav Glass <davglass@gmail.com>",
"version": "0.1.9",
"version": "0.1.10",
"devDependencies": {

@@ -27,8 +27,3 @@ "vows": "*",

},
"licenses": [
{
"type": "BSD",
"url": "https://github.com/davglass/echoecho/blob/master/LICENSE"
}
],
"license": "BSD-3-Clause",
"repository": {

@@ -35,0 +30,0 @@ "type": "git",

@@ -69,6 +69,10 @@ EchoEcho

In addition, when serving requests, you can specify an optional directory
root within which `echoecho` can find the files to serve for customized
responses by providing an object containing a `dirroot`
key as the third argument to `serve`.
Here's a simple example, assuming your tests serve from `/build/tests/mine/index.html`
```
```js
//Prepping once

@@ -115,2 +119,23 @@ //Tell echoecho to serve from these base paths

Handling all requests and serving from a different root:
```
var ee = new require('echoecho').EchoEcho({
all: true
});
// Can echoecho respond to this?
if (echoecho.handle(req.url)) {
// Pass in the request and response objects and echoecho will take it from here.
// Specify the optional configuration for dirroot to use an alternate
// base before the requested file.
echoecho.serve(req, res, {
dirroot: '/path/to/intended/root'
});
} else {
// throw your 404.
}
```
Using in Your Tests

@@ -117,0 +142,0 @@ -------------------

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