Untrack non-static files; keep .gitignore whitelist
This commit is contained in:
32
.replit
32
.replit
@@ -1,32 +0,0 @@
|
||||
modules = ["python-3.11"]
|
||||
|
||||
[workflows]
|
||||
runButton = "Project"
|
||||
|
||||
[[workflows.workflow]]
|
||||
name = "Project"
|
||||
mode = "parallel"
|
||||
author = "agent"
|
||||
|
||||
[[workflows.workflow.tasks]]
|
||||
task = "workflow.run"
|
||||
args = "Start application"
|
||||
|
||||
[[workflows.workflow]]
|
||||
name = "Start application"
|
||||
author = "agent"
|
||||
|
||||
[workflows.workflow.metadata]
|
||||
outputType = "webview"
|
||||
|
||||
[[workflows.workflow.tasks]]
|
||||
task = "shell.exec"
|
||||
args = "python3 serve.py"
|
||||
waitForPort = 5000
|
||||
|
||||
[[ports]]
|
||||
localPort = 5000
|
||||
externalPort = 80
|
||||
|
||||
[agent]
|
||||
expertMode = true
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
18
serve.py
18
serve.py
@@ -1,18 +0,0 @@
|
||||
import http.server
|
||||
import socketserver
|
||||
|
||||
PORT = 5000
|
||||
|
||||
class NoCacheHandler(http.server.SimpleHTTPRequestHandler):
|
||||
def end_headers(self):
|
||||
self.send_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
|
||||
self.send_header('Pragma', 'no-cache')
|
||||
self.send_header('Expires', '0')
|
||||
super().end_headers()
|
||||
|
||||
class ReusableTCPServer(socketserver.TCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
with ReusableTCPServer(("0.0.0.0", PORT), NoCacheHandler) as httpd:
|
||||
print(f"Serving on port {PORT} with cache disabled")
|
||||
httpd.serve_forever()
|
||||
Reference in New Issue
Block a user