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