diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/neyre.hoon (renamed from app/zodiac.hoon) | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/app/zodiac.hoon b/app/neyre.hoon index 0718da1..e8f2c17 100644 --- a/app/zodiac.hoon +++ b/app/neyre.hoon @@ -1,18 +1,23 @@ -/- *zodiac -/+ dbug, metamask +/- *neyre, coki +/+ dbug, cokil=coki /= router /web/router +=| sessions:coki +=* sessions - =| versioned-state =* state - %- agent:dbug ^- agent:gall |_ =bowl:gall +* this . - metalib ~(. metamask [sessions.state bowl]) + cokilib ~(. cokil [sessions bowl]) ++ on-init ^- (quip card:agent:gall agent:gall) :_ this =/ weblib router(bowl bowl) - :~((eyre-binding-card:weblib /zodiac)) + =/ weblib2 weblib(base-path /) + :~ (eyre-binding-card:weblib2 /) + (eyre-binding-card:weblib2 /[dap.bowl]) + == :: ++ on-save ^- vase @@ -32,27 +37,17 @@ ++ on-poke |= [=mark =vase] ^- (quip card:agent:gall agent:gall) - |^ ?+ mark `this - %noun (on-poke-noun !<(* vase)) + %coki =^ cards sessions (handle-self-poke:cokilib !<(self-poke:coki vase)) + [cards this] %handle-http-request + ~& "handling http" =/ order !<([id=@ta req=inbound-request:eyre] vase) - =/ weblib ~(. router [bowl id.order req.order state]) - :- route:weblib this + =/ weblib ~(. router [bowl id.order req.order state sessions]) + =/ weblib2 weblib(base-path /) + :- route:weblib2 this + %noun ~& > s=sessions `this == - ++ on-poke-noun |= a=* - ?: ?= [%logout @ @] a - ~& "loggingout" - =^ cards sessions.state (handle-logout:metalib +.a) - [cards this] - - =. sessions.state - ?+ a sessions.state - [%meta @t] (handle-meta:metalib +.a) - [%auth @p @ @uv] (handle-auth:metalib +.a) - == - `this - -- :: ++ on-watch |~ path |