...
 
Commits (3)
;; The 'nil' configuration applies to all modes.
((nil . ((indent-tabs-mode . nil)
(tab-width . 2)
(eval . (progn
;; minikanren stuff
(put 'run* 'scheme-indent-function 1)
(put 'fresh 'scheme-indent-function 1)
(put 'conde 'scheme-indent-function nil)
(put 'run** 'scheme-indent-function 1)
;; fs
(put 'fs:query 'scheme-indent-function 1)
;; wiredtigerz
(put 'with-cursor 'scheme-indent-function 1)
(put 'with-directory 'scheme-indent-function 1)
(put 'with-env 'scheme-indent-function 1)
(put 'with-context 'scheme-indent-function 1)
(put 'with-context* 'scheme-indent-function nil)
(put 'match 'scheme-indent-function 1)
(put 'with-transaction 'scheme-indent-function 1)
(put 'test-check 'scheme-indent-function 1)
(put 'call-with-cursor 'scheme-indent-function 1)
(put 'with-cnx 'scheme-indent-function 1)
;; others
(put 'match 'scheme-indent-function 1)
)))))
......@@ -25,6 +25,12 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(use-modules ((web server)))
(use-modules ((web uri)))
;; third party
(use-modules ((wiredtiger extra)))
(use-modules ((wiredtiger feature-space)))
(use-modules ((wiredtiger grf3)))
(use-modules ((wiredtiger wiredtiger)))
;; local
(use-modules ((web decode)))
(use-modules ((web helpers)))
......@@ -186,12 +192,12 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(type "text"))))
,(maybe-error username-error))
(div (@ (class ,(make-class `(("form-item" . #t)
("error" . ,password-error)))))
("error" . ,password-error)))))
(p (label "password")
(input (@ (name "password")
(type "password")))))
(div (@ (class ,(make-class `(("form-item" . #t)
("error" . ,confirmation-error)))))
("error" . ,confirmation-error)))))
(p (label "confirmation")
(input (@ (name "confirmation")
(type "password")))))
......@@ -225,15 +231,17 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(sxml->response (signup/template errors))))))
(define (handler request body)
(match (cons (request-method request) (request-path-components request))
('(GET) (index request))
('(GET "signin") (signin/get request))
('(POST "signin") (signin/post request post))
('(GET "signup") (signup/get request))
('(POST "signup") (signup/post request body))
(('GET "static" path ...) (render-static-asset path))
(_ (not-found (uri-path (request-uri request))))))
(with-context*
(match (cons (request-method request) (request-path-components request))
('(GET) (index request))
('(GET "signin") (signin/get request))
('(POST "signin") (signin/post request post))
('(GET "signup") (signup/get request))
('(POST "signup") (signup/post request body))
(('GET "static" path ...) (render-static-asset path))
(_ (not-found (uri-path (request-uri request)))))))
(define-public (main _)
(format #t "Server running @ http://localhost:8080\n")
(run-server handler))
(with-env (env-open* "wt" (list *feature-space*) "create,log=(enabled=true)")
(run-server handler)))