...
 
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" "$@" ...@@ -25,6 +25,12 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(use-modules ((web server))) (use-modules ((web server)))
(use-modules ((web uri))) (use-modules ((web uri)))
;; third party
(use-modules ((wiredtiger extra)))
(use-modules ((wiredtiger feature-space)))
(use-modules ((wiredtiger grf3)))
(use-modules ((wiredtiger wiredtiger)))
;; local ;; local
(use-modules ((web decode))) (use-modules ((web decode)))
(use-modules ((web helpers))) (use-modules ((web helpers)))
...@@ -186,12 +192,12 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@" ...@@ -186,12 +192,12 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(type "text")))) (type "text"))))
,(maybe-error username-error)) ,(maybe-error username-error))
(div (@ (class ,(make-class `(("form-item" . #t) (div (@ (class ,(make-class `(("form-item" . #t)
("error" . ,password-error))))) ("error" . ,password-error)))))
(p (label "password") (p (label "password")
(input (@ (name "password") (input (@ (name "password")
(type "password"))))) (type "password")))))
(div (@ (class ,(make-class `(("form-item" . #t) (div (@ (class ,(make-class `(("form-item" . #t)
("error" . ,confirmation-error))))) ("error" . ,confirmation-error)))))
(p (label "confirmation") (p (label "confirmation")
(input (@ (name "confirmation") (input (@ (name "confirmation")
(type "password"))))) (type "password")))))
...@@ -225,15 +231,17 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@" ...@@ -225,15 +231,17 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
(sxml->response (signup/template errors)))))) (sxml->response (signup/template errors))))))
(define (handler request body) (define (handler request body)
(match (cons (request-method request) (request-path-components request)) (with-context*
('(GET) (index request)) (match (cons (request-method request) (request-path-components request))
('(GET "signin") (signin/get request)) ('(GET) (index request))
('(POST "signin") (signin/post request post)) ('(GET "signin") (signin/get request))
('(GET "signup") (signup/get request)) ('(POST "signin") (signin/post request post))
('(POST "signup") (signup/post request body)) ('(GET "signup") (signup/get request))
(('GET "static" path ...) (render-static-asset path)) ('(POST "signup") (signup/post request body))
(_ (not-found (uri-path (request-uri request)))))) (('GET "static" path ...) (render-static-asset path))
(_ (not-found (uri-path (request-uri request)))))))
(define-public (main _) (define-public (main _)
(format #t "Server running @ http://localhost:8080\n") (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)))