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

es6-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-dev-server - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "es6-dev-server",
"version": "0.0.2",
"version": "0.0.3",
"bin": {

@@ -5,0 +5,0 @@ "es6-dev-server": "./server"

@@ -5,2 +5,4 @@ # Serve ES6 modules

Resolution is done via the node algorithm, but letting "module" or "jsnext" fields in package.json take precedence over "main".
## Usage as a stand alone server

@@ -34,3 +36,3 @@

app.use(moduleMiddleware('.'))
...
````

@@ -46,1 +48,13 @@ The parameter is the directory that will be served.

````
const ModuleMiddleware = require('es6-dev-server').ModuleMiddleware
const mm = new ModuleMiddleware({ root })
app.use((req, res, next) => {
if (mm.handleRequest(req, res)) {
// The request WAS handled by the middleware's handleRequest() function
} else {
// The request was NOT handled by the middleware's handleRequest() function
next()
}
})
````
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