nukashimika
2 years ago
3 changed files with 30 additions and 0 deletions
@ -0,0 +1,9 @@
|
||||
(ql:quickload "hunchentoot") |
||||
|
||||
(defun start-server () |
||||
(make-instance 'hunchentoot:easy-acceptor :port 4444 |
||||
:document-root #p"src/")) |
||||
|
||||
|
||||
(defun stop-server () |
||||
(hunchentoot:stop *)) |
@ -0,0 +1,20 @@
|
||||
import distro |
||||
import subprocess |
||||
|
||||
class Server: |
||||
def run(self): |
||||
self.start() |
||||
|
||||
def start(self): |
||||
if distro.id() == 'nixos': |
||||
subprocess.run(["hunchentoot-lisp-launcher.sh", "--load", "server.lisp"]) |
||||
else: |
||||
subprocess.run(["sbcl", "--load", "server.lisp"]) |
||||
|
||||
|
||||
def Main(): |
||||
s = Server() |
||||
s.run() |
||||
|
||||
if __name__ == '__main__': |
||||
Main() |
Loading…
Reference in new issue