File tree Expand file tree Collapse file tree 4 files changed +49
-3
lines changed Expand file tree Collapse file tree 4 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 1- from nginx
2- copy _site/ /usr/share/nginx/html
1+ from davazp/quicksbcl
2+ run apt-get update
3+ run apt-get install -y libssl-dev
4+ expose 80
5+
6+ run sbcl --eval '(ql:update-all-dists :prompt nil)' --eval '(ql:quickload :hunchentoot)' --eval '(ql:quickload :local-time)' --non-interactive
7+
8+ copy source/ /opt/articulate-common-lisp/www
9+ copy _site/ /opt/articulate-common-lisp/www/static
10+
11+ cmd sbcl --load /opt/articulate-common-lisp/www/main.lisp --eval '(start)' --non-interactive
Original file line number Diff line number Diff line change 5656 href : " /quicklisp.html"
5757
5858- title : " Who?"
59- href : " /about/ "
59+ href : " /about.html "
File renamed without changes.
Original file line number Diff line number Diff line change 1+ (ql :quickload ' ( :hunchentoot :local-time ))
2+
3+ (defvar *acceptor* nil " the hunchentoot acceptor" )
4+ (format t " Articulating Common Lisp...~% " )
5+
6+ (hunchentoot :define-easy-handler (release :uri " /api/release" ) ()
7+ (setf (hunchentoot :content-type*) " text/plain" )
8+ (format t " A release of articulate-common-lisp is present!" )
9+ (with-open-file (stream " /tmp/articulate-common-lisp.release" :direction :output :if-exists :overwrite :if-does-not-exist :create )
10+ (format stream " begin release @ ~a " (local-time :now)))
11+ " Release acknowledged. Grimoires under consultation." )
12+
13+ (defun start (&optional (fake-daemon t ) &key (path nil ) (port 80 ))
14+ (format t " Starting web server...~% " )
15+
16+ (setf hunchentoot :*dispatch-table*
17+ (append
18+ hunchentoot :*dispatch-table*
19+ (list
20+ (hunchentoot :create-static-file-dispatcher-and-handler
21+ " /" (if path
22+ (concatenate ' string path " /index.html" )
23+ #p " /opt/articulate-common-lisp/www/static/index.html" ))
24+ (hunchentoot :create-folder-dispatcher-and-handler
25+ " /"
26+ (if path
27+ path
28+ #p " /opt/articulate-common-lisp/www/static/" )))))
29+
30+ (setf *acceptor* (make-instance ' hunchentoot:easy-acceptor :port port))
31+ (hunchentoot :start *acceptor* )
32+
33+ (when fake-daemon
34+ (loop while t
35+ do
36+ (format t " ~&~a - heartbeat...~% " (local-time :now))
37+ (sleep 5 ))))
You can’t perform that action at this time.
0 commit comments