これをapp.yamlで使用します
- url: /.*
script: server.application
開発サーバーを使用する場合
dev_appserver.py --use_sqlite -a 0.0.0.0 -p 8842 /ホーム/ビットコイン/42btc
1 回目は空のページ 2 回目はすべてが正しい
トルネード使ってる
application = tornado.wsgi.WSGIApplication(
[
(r"/(.*)", ViewIndex),
],
)
コードを変更すると、最初のリクエストはシェルでレスポンスを出力し、ステータスは 200 で本文は空になります
INFO 2013-03-04 02:26:57,679 dev_appserver_multiprocess.py:658] Admin console is available at: http://0.0.0.0:8942/_ah/admin
INFO 2013-03-04 02:26:58,487 py_zipimport.py:148] zipimporter('/home/bitcoin/42btc/misc/virtualenv.zip', '')
Status: 200
Content-Length: 4792
Etag: "17302e0828d268f8d65efab7c1edb483d0ffa61d"
Content-Type: text/html; charset=UTF-8
Server: TornadoServer/2.4.1
Set-Cookie: _xsrf=cf8c38780922411a859f197e686910a4; Path=/
<!DOCTYPE html><meta charset="utf-8"><script src="/js/init.js"></script><link rel="stylesheet" href="/css/init.css" type="text/css"><title>42btc.com</title><body>
...
2番目のリクエストはOKです....