tornadoweb / tornadoweb/tornado
Serve multiple Applications from a single HTTPServer
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 22.2k
- Forks
- 5.6k
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 16
Description
I would like to serve a variety of applications from a single HTTPServer.
Normally, I would just take the various handler dictionaries and merge them somehow. However, one of my applications is a Bokeh server application, which has its own custom subclass of tornado.web.Application, and I'd rather not try to unpack the logic that that custom subclass does.
In my ideal world I would either ...
-
List all of the applications, and hope that their routes do not intersect
server = web.HTTPServer([app1, app2]) -
Key each application with a prefix
server = web.HTTPServer({"/app1": app1, "/app2": app2})
Is there some way to do something similar today?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the HTTPServer entry point and the custom tornado.web.Application behavior described in the issue. Investigate how multiple applications or prefixed applications could coexist without unpacking application-specific routing logic. Done means a supported, tested way to serve several applications from one HTTPServer, including the proposed list or prefix-based use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100