-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun.lisp
29 lines (22 loc) · 947 Bytes
/
run.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"
Usage:
sbcl --load run.lisp
This loads the project's asd, loads the quicklisp dependencies, and
starts the web server.
Then, we are given the lisp prompt: we can interact with the running application.
Another solution to run the app is to run the executable (see README).
"
(require "asdf") ;; for Docker
(load "openbookstore.asd")
(ql:quickload "openbookstore")
(in-package :openbookstore/web)
(handler-bind ((error (lambda (c)
(format *error-output* "~&An error occured: ~a~&" c)
(format *error-output* "~&Backtrace:~&")
(trivial-backtrace:print-backtrace c))
;; XXX: quit also kills the current lisp process, which is
;; annoying when developing with a REPL.
;; (uiop:quit 1)
))
(start-app :port (or (ignore-errors (parse-integer (uiop:getenv "OBS_PORT")))
*port*)))