-
Notifications
You must be signed in to change notification settings - Fork 0
/
website.py
21 lines (18 loc) · 865 Bytes
/
website.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import socketio
import eventlet
import time, threading
import json
port = 6969
sio = socketio.Server(cors_allowed_origins='*')
app = socketio.WSGIApp(sio, static_files={
'/': {'content_type': 'text/html', 'filename': 'docs/index.html'},
'/socket.io.min.js': {'content_type': 'text/javascript', 'filename': 'docs/socket.io.min.js'},
'/main.js': {'content_type': 'text/javascript', 'filename': 'docs/main.js'},
'/game': {'content_type': 'text/html', 'filename': 'docs/game.html'},
'/particles.js': {'content_type': 'text/javascript', 'filename': 'docs/particles.js'},
'/jqeruy.js': {'content_type': 'text/javascript', 'filename': 'docs/jqeruy.js'},
'/builds.json': {'content_type': 'text/javascript', 'filename': 'builds.json'},
})
def run():
eventlet.wsgi.server(eventlet.listen(('', port)), app, debug=True) # Note this line
run()