Starts handling requests. If called in a CGI or FastCGI context, it will follow that protocol. If called from the command line, it will start an HTTP server on the port named in the first command line argument, or, if there is no argument, on port 8080. `mid
(self, *middleware)
| 344 | return wsgi |
| 345 | |
| 346 | def run(self, *middleware): |
| 347 | """ |
| 348 | Starts handling requests. If called in a CGI or FastCGI context, it will follow |
| 349 | that protocol. If called from the command line, it will start an HTTP |
| 350 | server on the port named in the first command line argument, or, if there |
| 351 | is no argument, on port 8080. |
| 352 | |
| 353 | `middleware` is a list of WSGI middleware which is applied to the resulting WSGI |
| 354 | function. |
| 355 | """ |
| 356 | return wsgi.runwsgi(self.wsgifunc(*middleware)) |
| 357 | |
| 358 | def stop(self): |
| 359 | """Stops the http server started by run.""" |