cl-chat-web/package.lisp

70 lines
1.8 KiB
Common Lisp
Raw Normal View History

2024-10-11 16:45:22 -04:00
(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
#:clear-messages))
2024-10-11 16:45:22 -04:00
(defpackage #:live-chat-ui
2024-10-11 16:45:22 -04:00
(:use #:cl)
(:local-nicknames (#:cl-who #:cl-who))
(:import-from #:live-chat-db
#:insert-message
#:fetch-messages)
(:export #:set-subpath-prefix
#:generate-html-message
#:render-chat-messages
2024-10-11 16:45:22 -04:00
#:render-chat-ui
#:*messages*))
(defpackage #:live-chat-cgi
(:use #:cl)
(:import-from #:live-chat-ui)
2024-10-11 16:45:22 -04:00
(:export #:cgi-handler))
(defpackage #:live-chat-ws
(:use #:cl)
(:import-from #:live-chat-ui
#:generate-html-message)
(:import-from #:websocket-driver
#:make-client
#:make-server
#:on
#:send
#:start-connection
#:close-connection)
(:export #:make-websocket-server
#:handle-close-connection
#:handle-post-message
#:broadcast-to-room
#:handle-new-connection
#:*connections*))
2024-10-11 16:45:22 -04:00
(defpackage #:live-chat-routes
(:use #:cl)
(:import-from #:live-chat-db
#:insert-message)
(:import-from #:live-chat-ws
#:handle-post-message)
(:import-from #:live-chat-ui
#:render-chat-messages
#:render-chat-ui)
(:local-nicknames (#:cl-who #:cl-who)
(#:myway #:myway))
(:export #:app))
2024-10-11 16:45:22 -04:00
(uiop:define-package #:live-chat
(:use #:cl)
(:import-from #:clack #:clackup)
(:use-reexport #:live-chat-ui
2024-10-11 16:45:22 -04:00
#:live-chat-db
#:live-chat-routes))
2024-10-11 16:45:22 -04:00
(in-package #:live-chat)