Example #1
0
def main():
    app = wsgiwapi.make_application({
        'find': find_hospital,
        'docs': docs,
        '': frontpage,
    })

    server = wsgiwapi.make_server(app, ('0.0.0.0', 10011))
    try:
        server.start()
    except KeyboardInterrupt:
        server.stop()
Example #2
0
#!/usr/bin/python
"""
Wrapper around djape to allow it to be bound to a specific
IP address - in production, we want it to only accept 
requests from localhost.
"""

import sys, os

sys.path.append(os.path.join(os.path.realpath(os.path.dirname(__file__)), "djape"))
import cpserv

from djape.server.application import Application
import wsgiwapi

if __name__ == "__main__":
    import sys

    server = wsgiwapi.make_server(Application(), ("0.0.0.0", 9876))
    try:
        server.start()
    except KeyboardInterrupt:
        server.stop()
Example #3
0
#!/usr/bin/env python

import sys

import ext

import flax.searchserver
import wsgiwapi
import settings

try:
    settings.settings['data_path'] = sys.argv[1]
except IndexError:
    pass

app = flax.searchserver.App(settings.settings)

server = wsgiwapi.make_server(app, settings.settings['server_bind_address'])
try:
    server.start()
except KeyboardInterrupt:
    server.stop()