summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGeorges-Etienne Legendre <legege@legege.com>2013-06-28 15:47:27 -0400
committerGeorges-Etienne Legendre <legege@legege.com>2013-06-28 15:47:27 -0400
commit15c2d9140a9d26d4f074432aafc5872b58590c22 (patch)
treea9c2f81b3271f623568a74376f2e53b20efe7e91 /example
parent5ed4980f1ff591388681fe4073c8f9354794fe2f (diff)
parentda9099460799fd51035836e120ac99d707a83bde (diff)
Merge branch 'patch-1' of https://github.com/bignerd95/node-mjpeg-proxy into bignerd95-patch-1
Diffstat (limited to 'example')
-rw-r--r--example/express-app.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/example/express-app.js b/example/express-app.js
index ad8e53c..d82f1b2 100644
--- a/example/express-app.js
+++ b/example/express-app.js
@@ -19,22 +19,20 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
+var MjpegProxy = require('mjpeg-proxy').MjpegProxy;
var express = require('express');
-var MjpegProxy = require('../mjpeg-proxy').MjpegProxy;
+var app = express();
+var HTTP_PORT = 8080;
var cam1 = "http://admin:admin@192.168.124.54/cgi/mjpg/mjpg.cgi";
var cam2 = "http://admin:@192.168.124.32/videostream.cgi";
-var app = express();
-
app.set("view options", {layout: false});
app.use(express.static(__dirname + '/public'));
-app.get('/', function(req, res) {
- res.render('index.html');
-});
-
app.get('/index1.jpg', new MjpegProxy(cam1).proxyRequest);
app.get('/index2.jpg', new MjpegProxy(cam2).proxyRequest);
-app.listen(8080) \ No newline at end of file
+app.listen(HTTP_PORT);
+
+console.log("Listening on port "+HTTP_PORT);