Added a couple of simple test files for documentation purposes.
This commit is contained in:
12
examples/silly-test.cl
Normal file
12
examples/silly-test.cl
Normal file
@ -0,0 +1,12 @@
|
||||
(cl:defpackage :TEST-CLASH (:USE :CL :CLASH))
|
||||
(cl:in-package :TEST-CLASH)
|
||||
(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>"))
|
||||
(start-http-listener 3080 *my-server*)
|
||||
(initialize-clash)
|
||||
15
examples/static-test.cl
Normal file
15
examples/static-test.cl
Normal file
@ -0,0 +1,15 @@
|
||||
;;(eval-when (:compile-toplevel :load-toplevel :execute) (require "CLASH"))
|
||||
(defpackage :CLASH-BENCH (:use :cl :CLASH))
|
||||
(in-package :CLASH-BENCH)
|
||||
|
||||
(eval-when (:compile-toplevel :load-toplevel :execute) (enable-clash-syntax))
|
||||
(defvar *my-server* (make-instance 'http-server/1.0))
|
||||
|
||||
(apply #'export-files *my-server* "image/gif" #u"/img/" (directory "*.gif"))
|
||||
(apply #'export-files *my-server* "image/jpeg" #u"/img/" (directory "*.jpg"))
|
||||
(apply #'export-files *my-server* "text/html" #u"/" (directory "*.html"))
|
||||
|
||||
(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