Opened 2 years ago

Closed 8 weeks ago

#9659 defect closed fixed (fixed)

"Serving Static Content From a Directory" example port mismatch

Reported by: Tom Most Owned by: Tom Most
Priority: lowest Milestone:
Component: web Keywords:
Cc: Branch: 9659-web-port-example
branch-diff, diff-cov, branch-cov, buildbot
Author:

Description

The Twisted Web in 60 Seconds example "Serving Static Content From a Directory" states that these are equivalent:

from twisted.web.server import Site
from twisted.web.static import File
from twisted.internet import reactor, endpoints

resource = File('/tmp')
factory = Site(resource)
endpoint = endpoints.TCP4ServerEndpoint(reactor, 8888)
endpoint.listen(factory)
reactor.run()
twistd -n web --path /tmp

However, they aren't because the default port for the web plugin is 8080 rather than 8888. They should match.

Change History (4)

comment:1 Changed 3 months ago by Tom Most

Branch: 9659-web-port-example
Owner: set to Tom Most
Status: newassigned

comment:2 Changed 3 months ago by Tom Most

Keywords: review added
Owner: Tom Most deleted
Status: assignednew

comment:3 Changed 8 weeks ago by Glyph

Keywords: review removed
Owner: set to Tom Most

comment:4 Changed 8 weeks ago by Tom Most <twm@…>

Resolution: fixed
Status: newclosed

In 38d878d:

Merge pull request #1526 from twisted/9659-web-port-example

Author: twm
Reviewer: adiroiban
Fixes: ticket:9659

Correct port number in web example

Note: See TracTickets for help on using tickets.