Commit 43de5d70 authored by Bstrdsmkr's avatar Bstrdsmkr
Browse files

Update challenge 2 template

parent 5bb1eccb
test.py
bottle.py
*.pyc
*.pyo
......@@ -26,14 +26,16 @@ def poll_user_input(nick):
while True:
msg = raw_input("Send message: ")
payload = {'msg': msg, 'nick': nick}
requests.post('http://testpuppet.ornl.gov/chat', data=payload)
requests.post('http://testpuppet.ornl.gov:8181/chat', data=payload)
##############################################################
# 1. Use your code from Challenge #1 to register to the server
# 2. Set the 'my_nick' variable to the uid you registered with
##############################################################
input_loop = Thread(target=poll_user_input, args=(my_nick,))
input_loop.daemon = True
input_loop.start()
run(app, host='localhost', port=80)
run(app, quiet=True, host='0.0.0.0', port=8080)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment