Beispiel #1
0
    def starting(self):
        root = resource.Resource()
        root.putChild("", static.File(os.path.join(os.path.dirname(__file__), "webio.html")))
        site = server.Site(root)
        io = listen(site)
        reactor.listenTCP(8880, site)

        io.events.addObserver("connection", self.newClient)
Beispiel #2
0
    def started(self):
        root = resource.Resource()
        root.putChild("", static.File(self.path("data").child("web").child("index.html").path))
        root.putChild("lib", static.File(self.path("data").child("web").child("lib").path))
        root.putChild("recordings", static.File(self.recordingsPath.path))
        root.putChild("upload", UploadResource(self.fileUploaded, lambda rq, rf: "FAIL"))
        wrapBasicAuthentication(root, "admin", self.appOpts['password'], "We Are Forests - web admin")

        site = server.Site(root)
        self.webio = listen(site)
        reactor.listenTCP(8880, site)

        self.webio.events.addObserver("connection", self.newClient)
        self.webClients = set()
Beispiel #3
0
    def started(self):
        root = resource.Resource()
        root.putChild(
            "",
            static.File(
                self.path("data").child("web").child("index.html").path))
        root.putChild(
            "lib",
            static.File(self.path("data").child("web").child("lib").path))
        root.putChild("recordings", static.File(self.recordingsPath.path))
        root.putChild("upload",
                      UploadResource(self.fileUploaded, lambda rq, rf: "FAIL"))
        wrapBasicAuthentication(root, "admin", self.appOpts['password'],
                                "We Are Forests - web admin")

        site = server.Site(root)
        self.webio = listen(site)
        reactor.listenTCP(8880, site)

        self.webio.events.addObserver("connection", self.newClient)
        self.webClients = set()