-
Notifications
You must be signed in to change notification settings - Fork 1
/
tut.lisp
39 lines (30 loc) · 1011 Bytes
/
tut.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(defpackage #:tut
(:use :cl :weblocks
:f-underscore :anaphora :hu.dwim.defclass-star)
(:import-from :hunchentoot #:header-in
#:set-cookie #:set-cookie* #:cookie-in
#:user-agent #:referer)
(:import-from :hu.dwim.defclass-star #:defclass*)
(:documentation
"A web application based on Weblocks."))
(in-package :tut)
(export '(start-tut stop-tut))
;; A macro that generates a class or this webapp
(defwebapp tut
:prefix "/"
:description "tut: A new application"
:init-user-session 'tut::init-user-session
:autostart nil ;; have to start the app manually
:ignore-default-dependencies nil ;; accept the defaults
:debug t
)
;; Top level start & stop scripts
(defun start-tut (&rest args)
"Starts the application by calling 'start-weblocks' with appropriate
arguments."
(apply #'start-weblocks args)
(start-webapp 'tut))
(defun stop-tut ()
"Stops the application by calling 'stop-weblocks'."
(stop-webapp 'tut)
(stop-weblocks))