File tree Expand file tree Collapse file tree 4 files changed +34
-17
lines changed Expand file tree Collapse file tree 4 files changed +34
-17
lines changed Original file line number Diff line number Diff line change 1
- (in-package :asdf )
2
-
3
- (defsystem :example
4
- :name " example"
5
- :description " Example cl-heroku application"
6
- :depends-on (:hunchentoot )
7
- :components
8
- ((:static-file " example.asd" )
9
- (:module :src
10
- :serial t
11
- :components
12
- ((:file " hello-world" ))
13
- )))
1
+ (asdf :defsystem # :example
2
+ :serial t
3
+ :description " Example cl-heroku application"
4
+ :depends-on (# :hunchentoot
5
+ # :cl-who)
6
+ :components ((:file " package" )
7
+ (:module :src
8
+ :serial t
9
+ :components ((:file " hello-world" )))))
14
10
Original file line number Diff line number Diff line change
1
+ ; ;;; package.lisp
2
+
3
+ (defpackage #:example
4
+ (:use # :cl))
Original file line number Diff line number Diff line change
1
+ Hi. I'm a text file being served by Hunchentoot.
Original file line number Diff line number Diff line change 1
- (in-package :hunchentoot )
1
+ (in-package :example )
2
2
3
- (hunchentoot :define-easy-handler (hello-sbcl :uri " /" ) (name)
4
- (setf (hunchentoot :content-type*) " text/plain" )
5
- (format nil " Hey~@[ ~A ~] ! ~A ~A , Hunchentoot ~A " name (lisp-implementation-type ) (lisp-implementation-version ) hunchentoot ::*hunchentoot-version* ))
3
+ (push (hunchentoot :create-folder-dispatcher-and-handler " /static/" " /app/public/" )
4
+ hunchentoot :*dispatch-table* )
5
+
6
+ (hunchentoot :define-easy-handler (hello-sbcl :uri " /" ) ()
7
+ (cl-who :with-html-output-to-string (s)
8
+ (:html
9
+ (:head
10
+ (:title " Heroku CL Example App" ))
11
+ (:body
12
+ (:h1 " Heroku CL Example App" )
13
+ (:h3 " Using" )
14
+ (:ul
15
+ (:li (format s " ~A ~A " (lisp-implementation-type ) (lisp-implementation-version )))
16
+ (:li (format s " Hunchentoot ~A " hunchentoot ::*hunchentoot-version* ))
17
+ (:li (format s " CL-WHO" )))
18
+ (:div
19
+ (:a :href " static/lisp-glossy.jpg" (:img :src " static/lisp-glossy.jpg" :width 100 )))
20
+ (:div
21
+ (:a :href " static/hello.txt" " hello" ))))))
You can’t perform that action at this time.
0 commit comments