Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build and run app

  • Loading branch information...
commit 8a3fc79c2f04355dfe553f1dd2830e1696b6e44f 1 parent 15627e5
@mtravers mtravers authored
View
2  bin/release
@@ -10,5 +10,5 @@ config_vars:
PATH: bin:/usr/bin:/bin
CCL_DEFAULT_DIRECTORY: ccl
default_process_types:
- web: setup/launch -b -l setup/run.lisp
+ web: lispapp
EOF
View
13 setup/compile.lisp
@@ -7,11 +7,11 @@
;;; Standard
(defvar *app-dir* (butlast (pathname-directory *load-pathname*)))
+(defvar *cache-dir* (pathname-directory (pathname (concatenate 'string (getenv "CACHE_DIR") "/"))))
(require :asdf)
(load (make-pathname :directory (append *app-dir* '("lib")) :defaults "quicklisp.lisp"))
-(defvar *cache-dir* (pathname-directory (pathname (concatenate 'string (getenv "CACHE_DIR") "/"))))
;(load (make-pathname :defaults *load-pathname* :name "setup"))
@@ -27,6 +27,13 @@
(ql:quickload *app-name*)
(save-application
- (make-pathname :directory (getenv "BUILD_DIR") :name *app-name* :type "app")
-; :toplevel-function
+ (make-pathname :directory (getenv "BUILD_DIR") :name "lispapp")
+ :prepend-kernel t
+ :toplevel-function #'heroku-toplevel
)
+
+;;; +++ Belongs elsewhere, also needs to be extensible...
+(defun heroku-toplevel ()
+ (let ((port (parse-integer (getenv "PORT"))))
+ (format t "~%Listening on port ~A" port)
+ (net.aserve:start :port port)))
View
11 setup/run.lisp
@@ -1,11 +0,0 @@
-(in-package :cl-user)
-
-(load (make-pathname :defaults *load-pathname* :name "setup"))
-
-(ql:quickload *app-name*)
-
-(let ((port (or (ignore-errors (parse-integer (getenv "PORT")))
- 3000)))
- (format t "~%Listening on port ~A" port)
- (net.aserve:start :port port))
-
View
46 setup/setup.lisp
@@ -1,46 +0,0 @@
-(in-package :cl-user)
-
-;;; Customize
-
-(defvar *app-name* "example")
-
-;;; Standard
-
-(defvar *app-dir* (butlast (pathname-directory *load-pathname*)))
-
-;;; Overridden by compile.lisp
-(defvar *cache-dir* nil)
-
-(require :asdf)
-
-(defvar *quicklisp-home*
- (append (or *cache-dir* *app-dir*) '("quicklisp")))
-
-;;; Extraordinary hard to get this right, still not sure it is. :root ought to work, but doesn't.
-(setq asdf::*user-cache* (cons #P"/" (append (cdr *quicklisp-home*) '(".cache" "common-lisp" :implementation))))
-
-(if (probe-file (make-pathname :directory *quicklisp-home* :defaults "setup.lisp"))
- (progn
- (load (make-pathname :directory *quicklisp-home* :defaults "setup.lisp")))
- (progn
- (load (make-pathname :directory (append *app-dir* '("lib")) :defaults "quicklisp.lisp"))
- (print `(setting *[quicklisp-]home* ,*quicklisp-home*))
- (set (find-symbol "*HOME*" (find-package "QUICKLISP-QUICKSTART")) *quicklisp-home*)
- (set (find-symbol "*QUICKLISP-HOME*" (find-package "QUICKLISP-SETUP")) *quicklisp-home*)
-; (quicklisp-quickstart:install :path (make-pathname :directory (append *app-dir* '("quicklisp"))))
- (funcall (symbol-function (find-symbol "INSTALL" (find-package "QUICKLISP-QUICKSTART")))
- :path (make-pathname :directory *quicklisp-home*))
- ))
-
-(asdf:clear-system "acl-compat")
-
-(load (make-pathname :directory (append *app-dir* '("repos" "portableaserve" "acl-compat"))
- :defaults "acl-compat.asd"))
-(load (make-pathname :directory (append *app-dir* '("repos" "portableaserve" "aserve"))
- :defaults "aserve.asd"))
-
-;(asdf:operate 'asdf:load-op "acl-compat")
-
-(load (make-pathname :directory *app-dir* :name *app-name* :type "asd"))
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.