"use strict";

var util = require("util"),
    express = require("express"),
    seneca = require("seneca"),
    routes = require("./routes");


var app = express(),
    port = routes.config.port,
    staticFiles = express.static,
    apiUrl = routes.config.apiUrl;

process.on("uncaughtException", function (err) {
    console.log(err);
});

app.use(staticFiles(routes.config.staticFiles));
app.use(apiUrl, routes.apis);

app.listen(port, function () {
    util.log("Argo listening on http://localhost:" + port);
    util.log("Argo listening apis on http://localhost:" + port + apiUrl);
}).on("upgrade", function (request, socket, body) {
    routes.stream.run(request, socket, body);

    util.log("Argo streaming prices and events on ws://localhost:" +
        port + routes.config.streamUrl);
});

seneca = seneca();
seneca.use("plugin/register.js");
seneca.listen();

seneca.ready(function (error) {
    if (!error) {
        seneca.act("role:plugin", {
            cmd: "register",
            name: "ready"
        }, function (err, result) {
            if (!err) {
                util.log("Argo plugin:", result.value);
            }
        });
    }
});

@@ -74,22 +74,22 @@
 %22),%0A    
-seneca
+Bridge
  = requi
@@ -96,16 +96,21 @@
 re(%22
-seneca%22)
+flic%22).bridge
 ,%0A  
@@ -804,368 +804,71 @@
 );%0A%0A
-seneca = seneca();%0Aseneca.use(%22plugin/register.js%22);%0Aseneca.listen();%0A%0Aseneca.ready(function (error) %7B%0A    if (!error) %7B%0A        seneca.act(%22role:plugin%22, %7B%0A            cmd: %22register%22,%0A            name: %22ready%22%0A        %7D, function (err, result) %7B%0A            if (!err) %7B%0A                util.log(%22Argo plugin:%22, result.value);%0A            %7D%0A        %7D);%0A    %7D%0A%7D);
+/*eslint-disable no-new */%0Anew Bridge();%0A/*eslint-enable no-new */
 %0A

Add Bridge of flic framework.