initial commit

This commit is contained in:
2026-08-05 14:49:16 -06:00
commit 4244a3625d
3 changed files with 47 additions and 0 deletions

16
.gitignore vendored Normal file
View File

@@ -0,0 +1,16 @@
# Dependencies
/node_modules/
# Compiled frontend assets (run `npm run build` to regenerate)
/public/assets/app.css
/public/assets/htmx.min.js
# Environment / secrets
.env
.env.*
!.env.example
# Editor / OS
.DS_Store
*.db

6
haus-tf.asd Normal file
View File

@@ -0,0 +1,6 @@
(defsystem "haus-tf"
:version "0.0.1"
:author "Rawley Fowler"
:license "MIT"
:depends-on ("woo" "clack" "lack" "spinneret" "cl-dbi" "ningle")
:components ((:file "main")))

25
main.lisp Normal file
View File

@@ -0,0 +1,25 @@
(defpackage :haus-tf
(:use :cl :ningle :lack :cl-dbi)
(:export #:*app*))
(in-package :haus-tf)
(defvar *ningle-app* (make-instance 'ningle:app))
(defvar *app*
(lack:builder
:session
*ningle-app*))
(defvar *db* (dbi:connect :sqlite3
:database-name "haus-tf.db"))
(setf (ningle:route *ningle-app* "/foo")
#'(lambda (params)
(declare (ignore params))
(let* ((query (dbi:prepare *db* "SELECT unixepoch() as EPOCH"))
(result (dbi:execute query))
(time (getf (dbi:fetch result) :EPOCH)))
(format nil "Time: ~A" time))))
(setf (ningle:route *ningle-app* "/")
"Hello from Common Lisp!")