Compare commits
2 Commits
82d7040aa3
...
988f80c4fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
988f80c4fb | ||
|
|
9558ae4b6e |
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Ignore everything by default
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Keep this file
|
||||||
|
!/.gitignore
|
||||||
|
|
||||||
|
# Whitelist: pure static site source only
|
||||||
|
!/*.html
|
||||||
|
!/*.js
|
||||||
|
!/*.css
|
||||||
|
|
||||||
|
# Whitelist: images used by the site
|
||||||
|
!/images/
|
||||||
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