root/controlies/Server.py @ 72
61 | manumora | ##############################################################################
|
|
# -*- coding: utf-8 -*-
|
|||
# Project: ControlIES
|
|||
# Module: Server.py
|
|||
# Purpose: ControlIES web server
|
|||
# Language: Python 2.5
|
|||
# Date: 7-Feb-2011.
|
|||
# Ver: 7-Feb-2011.
|
|||
# Author: Manuel Mora Gordillo
|
|||
# Copyright: 2011 - Manuel Mora Gordillo <manuito @no-spam@ gmail.com>
|
|||
#
|
|||
# ControlIES is free software: you can redistribute it and/or modify
|
|||
# it under the terms of the GNU General Public License as published by
|
|||
# the Free Software Foundation, either version 3 of the License, or
|
|||
# (at your option) any later version.
|
|||
# ControlIES is distributed in the hope that it will be useful,
|
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
# GNU General Public License for more details.
|
|||
# You should have received a copy of the GNU General Public License
|
|||
# along with ControlAula. If not, see <http://www.gnu.org/licenses/>.
|
|||
#
|
|||
##############################################################################
|
|||
from twisted.internet import reactor
|
|||
from twisted.web import static, server
|
|||
from twisted.web.server import Session
|
|||
from twisted.python.components import registerAdapter
|
|||
import MainLoop
|
|||
from zope.interface import Interface, Attribute, implements
|
|||
from Plugins.LdapConnection import LdapConnection, ILdapConnection
|
|||
registerAdapter(LdapConnection, Session, ILdapConnection)
|
|||
# Start up the web service.
|
|||
Root = MainLoop.ControlIESProtocol() #Resource object
|
|||
62 | manumora | Root.PageDir='/home/manu/proyectos/controlies/www/'
|
|
61 | manumora | site = server.Site(Root)
|
|
#my_server = static.File('/home/chisco/workspace/adminies/www/')
|
|||
reactor.listenTCP(7778,site)
|
|||
reactor.run()
|