summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);