Update silly example to be more useful.

This commit is contained in:
2016-09-15 11:33:00 +02:00
parent 0be606f7a0
commit 1395705040

25
examples/silly-test.lisp Normal file → Executable file
View 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))