hxp
2023-05-11 41c7b27b6ce4d57a1fc0f281d8323956599cceef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from bottle import run, Bottle
 
if __name__ == '__main__':
    myapp = Bottle()
 
    @myapp.route('/hello/:name/:count#\\d+#')
    def hello2(name, count):
        #start_response('200 OK', [('Content-Type', 'text/html')])
        return name + "----" + str(count)
 
    @myapp.route('/maybe/:name3/:count#\\d+#')
    @myapp.route('/cool/kk/:name3/:count#\\d+#')
    def maybe(name3, count):
        #start_response('200 OK', [('Content-Type', 'text/html')])
        return {123:name3 + "----" + str(count)}
    run(host='localhost', port=8080, app=myapp)