phonegap-soundwave
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -53,2 +53,6 @@ /*! | ||
* - `e` {Error} is null unless there is an error. | ||
* - `data` {Object} | ||
* - `server` {http.Server} is the server running. | ||
* - `address` {String} is the server address. | ||
* - `port` {Number} is the server port. | ||
*/ | ||
@@ -84,2 +88,3 @@ | ||
callback(null, { | ||
server: server, | ||
address: '127.0.0.1', | ||
@@ -86,0 +91,0 @@ port: options.port |
@@ -6,2 +6,3 @@ /*! | ||
var connect = require('connect'), | ||
cordova = require('./middleware/cordova'), | ||
mstatic = require('./middleware/static'); | ||
@@ -22,2 +23,5 @@ | ||
// serve cordova js if 404'd out from previous static server | ||
app.use(cordova()); | ||
// return the request listener | ||
@@ -24,0 +28,0 @@ return function(req, res, next) { |
{ | ||
"name": "phonegap-soundwave", | ||
"description": "Connect middleware to stream a PhoneGap app.", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/phonegap/node-phonegap-soundwave", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -1,2 +0,2 @@ | ||
# phonegap-soundwave | ||
# phonegap-soundwave [![Build Status][travis-ci-img]][travis-ci-url] | ||
@@ -37,1 +37,50 @@ > Connect middleware to stream a PhoneGap app. | ||
server.listen(3000); | ||
## API | ||
var soundwave = require('phonegap-soundwave'); | ||
### soundwave() | ||
Returns a `http.Server` request listener that is also a compatible | ||
`connect` middleware function. | ||
Returns: | ||
- {Function} request listener | ||
### soundwave.listen(port, [options]) | ||
Create an `http.Server` and listen on the specified port. | ||
All arguments are passed directly into `http.listen(...)`. | ||
See [http.listen](http://nodejs.org/api/http.html#http_server_listen_path_callback) | ||
for details. | ||
Returns: | ||
- {Object} that is an `http.Server` instance. | ||
### soundwave.serve(options, [callback]) | ||
Convenience method to `soundwave.listen(...)` that supports PhoneGap CLI events. | ||
Options: | ||
- `options` | ||
- `port` {Number} to listen on (Default: 3000). | ||
- `callback` {Function} | ||
- `e` {Error} is null unless there is an error. | ||
- `data` {Object} | ||
- `server` {http.Server} is the server running. | ||
- `address` {String} is the server address. | ||
- `port` {Number} is the server port. | ||
Events: | ||
- `error` is emitted when an error occurs. | ||
- `log` is emitted with server log info. | ||
[travis-ci-img]: https://travis-ci.org/phonegap/node-phonegap-soundwave.png?branch=master | ||
[travis-ci-url]: http://travis-ci.org/phonegap/node-phonegap-soundwave | ||
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
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
70826
1580
86
2
11
6