diff options
author | Anonymized <anonymous@example.com> | 2018-01-20 00:11:49 +0100 |
---|---|---|
committer | Anonymized <anonymous@example.com> | 2018-01-20 00:11:49 +0100 |
commit | f99ad3457edee1f2d63f5401f103dca873130a7d (patch) | |
tree | ad15905f301e3c926d51765e8862b26089905f5e | |
parent | c0cb936b41bc9ecb6e1ccae1fad3815cc095aae0 (diff) | |
download | gnunet-guile2-f99ad3457edee1f2d63f5401f103dca873130a7d.tar.gz gnunet-guile2-f99ad3457edee1f2d63f5401f103dca873130a7d.zip |
c3b2: add wiredtiger boilerplate
-rw-r--r-- | .gitignore | 4 | ||||
-rwxr-xr-x | prototypes/c3b2/web.scm | 16 | ||||
-rw-r--r-- | prototypes/c3b2/wt/README | 1 |
3 files changed, 15 insertions, 6 deletions
@@ -12,4 +12,6 @@ gnunet/config.scm | |||
12 | pre-inst-env | 12 | pre-inst-env |
13 | *.info | 13 | *.info |
14 | doc/stamp-vti | 14 | doc/stamp-vti |
15 | doc/version.texi \ No newline at end of file | 15 | doc/version.texi |
16 | |||
17 | prototypes/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 | |||