48 lines
1.2 KiB
Common Lisp
48 lines
1.2 KiB
Common Lisp
|
(in-package #:cl-user)
|
||
|
|
||
|
(defpackage #:live-chat-db
|
||
|
(:use #:cl)
|
||
|
(:local-nicknames (#:cl-dbi #:dbi))
|
||
|
(:export #:*db*
|
||
|
#:open-database
|
||
|
#:close-database
|
||
|
#:create-messages-table
|
||
|
#:insert-message
|
||
|
#:fetch-messages))
|
||
|
|
||
|
(defpackage #:live-chat-core
|
||
|
(:use #:cl)
|
||
|
(:local-nicknames (#:cl-who #:cl-who))
|
||
|
(:import-from #:live-chat-db
|
||
|
#:insert-message
|
||
|
#:fetch-messages)
|
||
|
(:export #:render-chat-messages
|
||
|
#:render-chat-ui
|
||
|
#:handle-post-message
|
||
|
#:*messages*))
|
||
|
|
||
|
(defpackage #:live-chat-cgi
|
||
|
(:use #:cl)
|
||
|
(:import-from #:live-chat-core)
|
||
|
(:export #:cgi-handler))
|
||
|
|
||
|
(defpackage #:live-chat-hunchentoot
|
||
|
(:use #:cl)
|
||
|
(:import-from #:live-chat-core
|
||
|
#:handle-post-message
|
||
|
#:render-chat-messages
|
||
|
#:render-chat-ui)
|
||
|
(:local-nicknames (#:cl-who #:cl-who)
|
||
|
(#:hunchentoot #:hunchentoot))
|
||
|
(:export #:start-chat-server))
|
||
|
|
||
|
(uiop:define-package #:live-chat
|
||
|
(:use #:cl)
|
||
|
(:use-reexport #:live-chat-core
|
||
|
#:live-chat-cgi
|
||
|
#:live-chat-db
|
||
|
#:live-chat-hunchentoot))
|
||
|
|
||
|
(in-package #:live-chat)
|
||
|
|