Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asylum
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
a-guile-mind
asylum
Compare Revisions
2fdfd7428042be8ee9ca7c3ba0d4b9347828e79b...11d1536085393de0e3b3dd3e15a214225422dd3a
Source
11d1536085393de0e3b3dd3e15a214225422dd3a
Select Git revision
...
Target
2fdfd7428042be8ee9ca7c3ba0d4b9347828e79b
Select Git revision
Compare
Commits (3)
add emacs configuration
· c2eda6e7
amirouche
authored
Feb 03, 2018
c2eda6e7
web: add wiredtiger
· eb7c8e76
amirouche
authored
Feb 03, 2018
eb7c8e76
cosmit
· 11d15360
amirouche
authored
Feb 03, 2018
11d15360
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
11 deletions
+44
-11
.dir-locals.el
.dir-locals.el
+25
-0
web.scm
src/web.scm
+19
-11
No files found.
.dir-locals.el
0 → 100644
View file @
11d15360
;; 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
)
)))))
src/web.scm
View file @
11d15360
...
@@ -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
)))