aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnonymized <anonymous@example.com>2018-01-20 00:11:49 +0100
committerAnonymized <anonymous@example.com>2018-01-20 00:11:49 +0100
commitf99ad3457edee1f2d63f5401f103dca873130a7d (patch)
treead15905f301e3c926d51765e8862b26089905f5e
parentc0cb936b41bc9ecb6e1ccae1fad3815cc095aae0 (diff)
downloadgnunet-guile2-f99ad3457edee1f2d63f5401f103dca873130a7d.tar.gz
gnunet-guile2-f99ad3457edee1f2d63f5401f103dca873130a7d.zip
c3b2: add wiredtiger boilerplate
-rw-r--r--.gitignore4
-rwxr-xr-xprototypes/c3b2/web.scm16
-rw-r--r--prototypes/c3b2/wt/README1
3 files changed, 15 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index eb37ab0..f100498 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,6 @@ gnunet/config.scm
12pre-inst-env 12pre-inst-env
13*.info 13*.info
14doc/stamp-vti 14doc/stamp-vti
15doc/version.texi \ No newline at end of file 15doc/version.texi
16
17prototypes/c3b2/wt/* \ No newline at end of file
diff --git a/prototypes/c3b2/web.scm b/prototypes/c3b2/web.scm
index aadd744..78d8cf2 100755
--- a/prototypes/c3b2/web.scm
+++ b/prototypes/c3b2/web.scm
@@ -26,6 +26,10 @@ exec guile -L $(pwd) -e '(@@ (web) main)' -s "$0" "$@"
26 26
27;; third party 27;; third party
28(use-modules (fibers web server)) 28(use-modules (fibers web server))
29(use-modules (wiredtiger wiredtiger))
30(use-modules (wiredtiger extra))
31(use-modules (wiredtiger feature-space))
32(use-modules (wiredtiger grf3))
29 33
30;; local 34;; local
31(use-modules (web decode)) 35(use-modules (web decode))
@@ -53,12 +57,14 @@ exec guile -L $(pwd) -e '(@@ (web) main)' -s "$0" "$@"
53 57
54 58
55(define (handler request body) 59(define (handler request body)
56 (match (cons (request-method request) (request-path-components request)) 60 (with-context*
57 (('GET) (render-html (template "index" '(div "Héllo Guilers")))) 61 (match (cons (request-method request) (request-path-components request))
58 (('GET "static" path ...) (render-static-asset path)) 62 (('GET) (render-html (template "index" '(div "Héllo Guilers"))))
59 (_ (not-found (uri->string (request-uri request)))))) 63 (('GET "static" path ...) (render-static-asset path))
64 (_ (not-found (uri->string (request-uri request)))))))
60 65
61 66
62(define (main _) 67(define (main _)
63 (format #t "Server running @ http://localhost:8080\n") 68 (format #t "Server running @ http://localhost:8080\n")
64 (run-server handler)) 69 (with-env (env-open* "wt" (list *feature-space*) "create,log=(enabled=true)")
70 (run-server handler)))
diff --git a/prototypes/c3b2/wt/README b/prototypes/c3b2/wt/README
new file mode 100644
index 0000000..dc9a8d7
--- /dev/null
+++ b/prototypes/c3b2/wt/README
@@ -0,0 +1 @@
this file exists to keep the directory in git history \ No newline at end of file