Update silly example to be more useful.
This commit is contained in:
23
examples/silly-test.lisp
Normal file → Executable file
23
examples/silly-test.lisp
Normal file → Executable file
@ -1,12 +1,23 @@
|
|||||||
(cl:defpackage :TEST-CLASH (:USE :CL :CLASH))
|
(cl:defpackage :TEST-CLASH (:USE :CL :CLASH))
|
||||||
(cl:in-package :TEST-CLASH)
|
(cl:in-package :TEST-CLASH)
|
||||||
(enable-clash-syntax)
|
(eval-when (:compile-toplevel :load-toplevel :execute) (enable-clash-syntax))
|
||||||
(defvar *my-server* (make-instance 'http-server/1.0))
|
(defvar *my-server* (make-instance 'http-server/1.0))
|
||||||
(export-resource *my-server* #u"/index.html"
|
(export-resource
|
||||||
|
*my-server* #u"/index.html"
|
||||||
'static-resource
|
'static-resource
|
||||||
:entity (make-instance 'string-entity :body
|
:entity
|
||||||
"<HTML><HEAD><TITLE>Test Page on ACL 5.0.3</TITLE></HEAD>
|
(make-instance 'string-entity
|
||||||
<BODY BGCOLOR='#eeeeff'><H1>Test Page on ACL 5.0.3</H1><P> Hi! </P>
|
:body
|
||||||
</BODY></HTML>"))
|
(format nil
|
||||||
|
"<HTML>~
|
||||||
|
<HEAD><TITLE>Simple CLASH Test Page on ~A ~A</TITLE></HEAD>~
|
||||||
|
<BODY BGCOLOR='#eeeeff'>~
|
||||||
|
<H1>Test Page on ~2:*~A ~A</H1>~
|
||||||
|
<P>Hi!</P>~
|
||||||
|
</BODY>~
|
||||||
|
</HTML>"
|
||||||
|
(lisp-implementation-type)
|
||||||
|
(lisp-implementation-version))))
|
||||||
(start-http-listener 3080 *my-server*)
|
(start-http-listener 3080 *my-server*)
|
||||||
(initialize-clash)
|
(initialize-clash)
|
||||||
|
(eval-when (:compile-toplevel :load-toplevel :execute) (disable-clash-syntax))
|
||||||
|
|||||||
Reference in New Issue
Block a user