bananajuicellc / first.bananajuice.tech

A selection game to help gamers pick who goes first.
https://whogoes1st.com
Mozilla Public License 2.0
1 stars 3 forks source link

Add command-line flags to switch host, port, and debug mode. #27

Closed tswast closed 8 years ago

tswast commented 8 years ago

Inspired by this snippet: http://flask.pocoo.org/snippets/133/ Updated to use argparse instead of optparse.

Emoji flags in honor of command-line flags

P.S. I made a gif this time, hopefully it shows up. 😜

tswast commented 8 years ago

The reason I needed this is that for security it's nice to restrict to just localhost / 127.0.0.1 when testing in debug mode, but often I also want to be able to test remotely (from another device like my phone or iPad) in which case I want to set the host to 0.0.0.0 without having to make code changes.

tswast commented 8 years ago

Hmm... I wonder why the tests didn't run?