From 531e905389a3d302093cc1992815bfebd0910ab8 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Thu, 15 Sep 2016 11:51:37 +0200 Subject: [PATCH] Modernize silly example somewhat. --- examples/silly-test.lisp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/silly-test.lisp b/examples/silly-test.lisp index 9629436..88e5549 100755 --- a/examples/silly-test.lisp +++ b/examples/silly-test.lisp @@ -1,7 +1,10 @@ (cl:defpackage :TEST-CLASH (:USE :CL :CLASH)) (cl:in-package :TEST-CLASH) (eval-when (:compile-toplevel :load-toplevel :execute) (enable-clash-syntax)) -(defvar *my-server* (make-instance 'http-server/1.0)) +(defparameter *my-server* (make-instance 'http-server/1.0)) +(apply #'export-files *my-server* "image/jpeg" #u"/img/" + (let ((*default-pathname-defaults* (merge-pathnames #P"../doc/" *load-pathname*))) + (directory "*.jpg"))) (export-resource *my-server* #u"/index.html" 'static-resource @@ -9,13 +12,15 @@ (make-instance 'string-entity :body (format nil - "~ - Simple CLASH Test Page on ~A ~A~ - ~ -

Test Page on ~2:*~A ~A

~ -

Hi!

~ - ~ - " + "~%~ + ~ + Simple CLASH Test Page on ~A ~A~ + ~ + ~ +

Test Page on ~2:*~A ~A

~ +

Hi!

~ + ~ + " (lisp-implementation-type) (lisp-implementation-version)))) (start-http-listener 3080 *my-server*)