Runs the basic hug development server against this API
(self, host="", port=8000, no_documentation=False, display_intro=True)
| 270 | return documentation |
| 271 | |
| 272 | def serve(self, host="", port=8000, no_documentation=False, display_intro=True): |
| 273 | """Runs the basic hug development server against this API""" |
| 274 | if no_documentation: |
| 275 | api = self.server(None) |
| 276 | else: |
| 277 | api = self.server() |
| 278 | |
| 279 | if display_intro: |
| 280 | print(INTRO) |
| 281 | |
| 282 | httpd = make_server(host, port, api) |
| 283 | print("Serving on {0}:{1}...".format(host, port)) |
| 284 | httpd.serve_forever() |
| 285 | |
| 286 | @staticmethod |
| 287 | def base_404(request, response, *args, **kwargs): |
no test coverage detected