mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
add port option to pelican.server
This commit is contained in:
parent
7ec4d5faa2
commit
3da4c2e13e
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import socketserver # NOQA
|
import socketserver # NOQA
|
||||||
|
|
||||||
PORT = 8000
|
PORT = len(sys.argv) == 2 and int(sys.argv[1]) or 8000
|
||||||
|
|
||||||
Handler = srvmod.SimpleHTTPRequestHandler
|
Handler = srvmod.SimpleHTTPRequestHandler
|
||||||
|
|
||||||
|
|
@ -26,4 +26,4 @@ try:
|
||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt as e:
|
||||||
print("shutting down server")
|
print("shutting down server")
|
||||||
httpd.socket.close()
|
httpd.socket.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue