(defop-raw some-fancy-url (str req) (w/stdout str (anon-login req) (prn) (some-fancy-url-handler req))) (def anon-login (req) (if (no (get-user req)) (withs (user (makeid 14) cookie (cook-user user)) (= (logins* user) req!ip) (prcookie cookie) (prn) (save-table cookie->user* cookfile*) (user->cookie* user) ))) (def some-fancy-url-handler (req) (pr "Hello World")) ;; And visit /some-fancy-url
I.e Document.Onload -> Document.Cookie
-----
(save-table cookie->user* cookfile*) (user->cookie* user)
makeid
rand-string
Perhaps it'll help to tell us more about what you're building and what you're trying to do and why.