def run(self):
         logging.info('Bottle {} server starting up'.format(bottle.__version__))
         bottle.run(host='localhost', port=8080)
Ejemplo n.º 2
0
#coding=utf-8

from __future__ import unicode_literals
from packages.bottle import route, run
from ingrex import intel, praser


@route('/p/<pid>')
def portal(pid):
    return praser.portal(intel.fetch_portal(pid))


run(port=8080)
Ejemplo n.º 3
0
               'TRACE'
           ])
def index():
    return normal_formsdict()


@app.route('/basic_auth',
           method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
@bottle.auth_basic(basic_auth_check)
def basic_auth():
    return normal_formsdict()


@app.route('/sleep/<seconds:int>',
           method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
def sleep(seconds):
    import time
    time.sleep(seconds)

    return normal_formsdict()


@app.route('http://www.example.com',
           method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
def index():
    return normal_formsdict()


# TODO run test server as service / daemon
bottle.run(app=app, host='127.0.0.1', port=8800, reloader=True)
Ejemplo n.º 4
0
 def run(self):
     logging.info('pywebase/bootle-{} server starting up'.format(bottle.__version__))
     bottle.TEMPLATE_PATH.append(settings.TEMPLATE_PATH)
     bottle.run(host='localhost', port=8080, debug=settings.DEBUG_MODE)
Ejemplo n.º 5
0
 def run(self):
     logging.info("Bottle {} server starting up".format(bottle.__version__))
     bottle.run(host="localhost", port=8080)
Ejemplo n.º 6
0
@app.route('/', method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH', 'TRACE'])
def index():
    return normal_formsdict()

@app.route('/#fragment', method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH', 'TRACE'])
def index():
    return normal_formsdict()


@app.route('/basic_auth', method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
@bottle.auth_basic(basic_auth_check)
def basic_auth():
    return normal_formsdict()

@app.route('/sleep/<seconds:int>', method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
def sleep(seconds):
    import time
    time.sleep(seconds)

    return normal_formsdict()

@app.route('http://www.example.com', method=['GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'PATCH'])
def index():
    return normal_formsdict()



# TODO run test server as service / daemon
bottle.run(app=app, host='127.0.0.1', port=8800, reloader=True)