Beispiel #1
0
from py.game_logic.UserList import UserList

# server setup settings:
import config


#=====================================#
#              GLOBALS                #
#=====================================#
app = Bottle()
CHUNKS = chunks()  # static chunks or strings for the site
DOMAIN = config.DOMAIN  # domain name
GAMES = GameList()  # list of ongoing games on server
GAMES.unpickle()  # restores any games that were saved last time server shut down

USERS = UserList()  # list of users on the server TODO: replace use of this w/ real db.
MASTER_CONFIG = 'default'  # config keyword for non-test pages. (see Config.py for more info)
loginTokens = []


#=====================================#
#            Static Routing           #
#=====================================#
@app.route('/css/<filename:path>')
def css_static(filename):
    return static_file(filename, root='./css/')


@app.route('/js/<filename:path>')
def js_static(filename):
    return static_file(filename, root='./js/')