kopia lustrzana https://github.com/cirospaciari/socketify.py
remove broken import
rodzic
dee8a9910d
commit
1131aad082
|
@ -29,7 +29,9 @@
|
||||||
# Express production recommendations: https://expressjs.com/en/advanced/best-practice-performance.html
|
# Express production recommendations: https://expressjs.com/en/advanced/best-practice-performance.html
|
||||||
# Fastify production recommendations: https://www.fastify.io/docs/latest/Guides/Recommendations/
|
# Fastify production recommendations: https://www.fastify.io/docs/latest/Guides/Recommendations/
|
||||||
|
|
||||||
from socketify import App, sendfile
|
# from socketify import App, sendfile
|
||||||
|
from socketify import App
|
||||||
|
from helpers.static_aiofile import static_route, sendfile
|
||||||
|
|
||||||
|
|
||||||
app = App()
|
app = App()
|
||||||
|
@ -43,8 +45,8 @@ async def home(res, req):
|
||||||
app.get("/", home)
|
app.get("/", home)
|
||||||
|
|
||||||
#serve all files in public folder under /* route (you can use any route like /assets)
|
#serve all files in public folder under /* route (you can use any route like /assets)
|
||||||
app.static("/", "./public")
|
# app.static("/", "./public")
|
||||||
|
static_route(app, "/", "./public")
|
||||||
app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port))
|
app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port))
|
||||||
app.run()
|
app.run()
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import time
|
||||||
from .uv import UVLoop
|
from .uv import UVLoop
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import uwebsocketspy
|
|
||||||
|
|
||||||
|
|
||||||
def future_handler(future, loop, exception_handler, response):
|
def future_handler(future, loop, exception_handler, response):
|
||||||
|
|
Ładowanie…
Reference in New Issue