Created
March 20, 2011 01:39
-
-
Save mrdaemon/877980 to your computer and use it in GitHub Desktop.
Example of launching paste server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from web.core import Controller | |
class RootController(Controller): | |
def index(self): | |
return 'Hello world!' | |
if __name__ == '__main__': | |
import logging | |
from paste import httpserver | |
from web.core import Application | |
logging.basicConfig(level=logging.INFO) | |
app = Application.factory(root=RootController, **{ | |
'debug': False, | |
'web.sessions': False, | |
'web.widgets': False, | |
'web.sessions': False, | |
'web.profile': False, | |
'web.static': False, | |
'web.compress': False | |
}) | |
httpserver.serve(app, host='127.0.0.1', port='8080') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment