Version 0.3.0
Enhanced multithreading engine, bugs fixed and more!
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
<h1>Hello from Amethyst!</h1>
|
||||
<h2>This page confirms Amethyst can read files from your PC or server and serve them to your browser!</h2>
|
||||
<p>This is a test page, if you aren't the server owner, they might not have finished setting up their site, be patient. If this doesn't go away after a while, tell them they've made an oopsie</p>
|
||||
<p>This server runs Amethyst build 0080</p>
|
||||
<p>This server runs Amethyst build 0.3.0-0114-mt-tryout1</p>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,10 +9,10 @@ import os
|
||||
|
||||
if not os.getcwd() in sys.path:
|
||||
sys.path.append(os.getcwd())
|
||||
import pywebsrv
|
||||
import amethyst
|
||||
|
||||
|
||||
class API:
|
||||
class PES:
|
||||
"""
|
||||
class
|
||||
"""
|
||||
@@ -20,7 +20,10 @@ class API:
|
||||
def __init__(self):
|
||||
# DO NOT USE THIS CLASS FOR PROGRAM, ONLY ON_REQUEST PLEASE!!
|
||||
# Below go definitions to get things working.
|
||||
self.build_response = pywebsrv.WebServer.build_binary_response
|
||||
self.build_response = amethyst.WebServer.build_binary_response
|
||||
self.fh = amethyst.FileHandler("..")
|
||||
self.rq = amethyst.RequestParser()
|
||||
self.THREAD_SAFETY: bool = True
|
||||
|
||||
def on_request(self, req):
|
||||
return self.build_response(200, "This is a test", "text/html")
|
||||
return self.build_response(200, b"Heyhey! This is the default PES script!", "text/html")
|
||||
Reference in New Issue
Block a user