Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using coffeekup with express #102

Open
cocodrino opened this issue Dec 1, 2011 · 0 comments
Open

using coffeekup with express #102

cocodrino opened this issue Dec 1, 2011 · 0 comments

Comments

@cocodrino
Copy link

Hi maurice..I've a doubt..is possible write inline views inside my express controllers?..similar to zappa:

@view hi: ->
h1 @name

I've used clojure noir and I like a lot the idea define my views inside my controller (I know than mvc is better but I don't like)
a noir example would be this:

(defpage "/cookie" []                         ;;defpage is similar to app.get
   (cookie/put! :noir "stuff")
    (let [v (cookie/get :noir)]               ;; v= cookie/get(noir)
         (layout                                          ;;layout is a function...similar to coffeekup...sweet
         [:p "You created a cookie:"]
         [:p "Value " v])))

is very nice for small apps and now than I found coffeekup I think it can fix me perfect....

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant