Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieulavoie committed Aug 30, 2016
2 parents 1f8d03d + 639523d commit e82db0a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion start_website.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
#!/usr/bin/python3
from web.web import app
import optparse

if __name__ == '__main__':
app.run(threaded=True)
default_ip="127.0.0.1"
default_port="5000"
parser = optparse.OptionParser()
parser.add_option("-i", "--ip",
help="IP address (use 0.0.0.0 for all) [default %s]" % default_ip, default=default_ip)
parser.add_option("-p", "--port",
help="Port to listen to [default %s]" % default_port, default=default_port)
parser.add_option("-d", "--debug",
action="store_true", dest="debug",
help="Enable debug mode")

options, _ = parser.parse_args()

app.run(
debug=options.debug,
host=options.ip,
port=int(options.port),
threaded=True
)

0 comments on commit e82db0a

Please sign in to comment.