rebranding to sim16 in progress
This commit is contained in:
parent
dc8da40d68
commit
d7bb16350c
|
@ -5,15 +5,15 @@ from flask import Flask, url_for, Response, render_template, request, jsonify, s
|
|||
from flask_socketio import SocketIO, emit
|
||||
import database as db
|
||||
|
||||
app = Flask("the-prestige", static_folder='simmadome/build')
|
||||
app = Flask("the-prestige", static_folder='simmadome/build/', subdomain_matching=True)
|
||||
app.config['SECRET KEY'] = 'dev'
|
||||
#url = "sakimori.space:5000"
|
||||
#app.config['SERVER_NAME'] = url
|
||||
socketio = SocketIO(app)
|
||||
|
||||
# Serve React App
|
||||
@app.route('/', defaults={'path': ''}, subdomain = "simsim")
|
||||
@app.route('/<path:path>', subdomain = "simsim")
|
||||
@app.route('/', defaults={'path': ''})
|
||||
@app.route('/<path:path>')
|
||||
def serve(path):
|
||||
if path != "" and os.path.exists(app.static_folder + '/' + path):
|
||||
return send_from_directory(app.static_folder, path)
|
||||
|
@ -22,7 +22,7 @@ def serve(path):
|
|||
|
||||
### API
|
||||
|
||||
@app.route('/api/teams/search', subdomain = "simsim")
|
||||
@app.route('/api/teams/search')
|
||||
def search_teams():
|
||||
query = request.args.get('query')
|
||||
page_len = int(request.args.get('page_len'))
|
||||
|
@ -42,7 +42,7 @@ def search_teams():
|
|||
MAX_SUBLEAGUE_DIVISION_TOTAL = 22;
|
||||
MAX_TEAMS_PER_DIVISION = 12;
|
||||
|
||||
@app.route('/api/leagues', methods=['POST'], subdomain = "simsim")
|
||||
@app.route('/api/leagues', methods=['POST'])
|
||||
def create_league():
|
||||
config = json.loads(request.data)
|
||||
|
||||
|
@ -114,7 +114,7 @@ def create_league():
|
|||
|
||||
### SOCKETS
|
||||
|
||||
thread2 = threading.Thread(target=socketio.run,args=(app,'sakimori.space:5000'))
|
||||
thread2 = threading.Thread(target=socketio.run,args=(app,"0.0.0.0", "80"))
|
||||
thread2.start()
|
||||
|
||||
master_games_dic = {} #key timestamp : (game game, {} state)
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
<title>⚾ The Simmadome</title>
|
||||
|
||||
<meta property="og:title" content="Watch at the Simmadome" />
|
||||
<meta property="og:description" content="The Simsim: Your players, your teams, your games." />
|
||||
<meta property="og:title" content="Sim16 at the Observatory" />
|
||||
<meta property="og:description" content="The Sim16: Your players, your teams, your games." />
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@SIBR_XVI">
|
||||
<meta name="twitter:site" content="@xvipsixteen">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
|
|
@ -42,13 +42,13 @@ function Header() {
|
|||
<a href="https://github.com/Sakimori/matteo-the-prestige" className="github_link" target="_blank" rel="noopener noreferrer">
|
||||
<img className="github_logo" src={githubLogo} alt="Github"/>
|
||||
</a>
|
||||
<a href="https://twitter.com/intent/follow?screen_name=SIBR_XVI" className="twitter_link" target="_blank" rel="noopener noreferrer">
|
||||
<a href="https://twitter.com/intent/follow?screen_name=xvipsixteen" className="twitter_link" target="_blank" rel="noopener noreferrer">
|
||||
<img className="twitter_logo" src={twitterLogo} alt="Twitter"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/" className="page_header"><h2 className="page_header" style={{fontSize:"50px"} as React.CSSProperties}>THE SIMMADOME</h2></a>
|
||||
<h2 className="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" className="link"><img src={discordlogo} alt="" height="30"/></a> to start your own games!</h2>
|
||||
<a href="/" className="page_header"><h2 className="page_header" style={{fontSize:"50px"} as React.CSSProperties}>THE OBSERVATORY</h2></a>
|
||||
<h2 className="page_header">Join us on <a href="https://discord.gg/ux6Drk8Bp7" className="link"><img src={discordlogo} alt="" height="30"/></a> to start your own games!</h2>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue