Browse Source

added hunchentoot local server

master
nukashimika 2 years ago
parent
commit
c7b2a2d6a2
  1. 1
      .gitignore
  2. 9
      server.lisp
  3. 20
      startserver.py

1
.gitignore vendored

@ -1 +1,2 @@
src/index.html
.idea

9
server.lisp

@ -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 *))

20
startserver.py

@ -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…
Cancel
Save