Hi Francesco,

Robert Stuttafird's example might help you out: 
https://github.com/robert-stuttaford/demo-enfocus-pubsub-remote

You may also want to use the remote macros on the client side, they might 
clean up the code for you a bit.

(ns CLJS-NS
 (:require-macros [shoreleave.client.remotes.macros :as srm]))

(defn ^:export perform-login [email 
password-str]                                                                   
                            

  (let [valid-password (some-validation 
password-str]                                                                   
                             

    (srm/rpc (login {:email email
                             :password 
valid-password})                                                                
                                                               

             
[login-response]                                                                
                                                                    

             (js/alert login-response))))

On the server, I assume you're using Compojure and Ring.
You'll need to define a remote called, login (it has to match the remote 
name on the client side).

(defremote login [credentials-map] ...)

And make sure you hook up the RPC middleware on the server-side.  Full 
instructions can be found here:
https://github.com/shoreleave/shoreleave-remote-ring

 - - - 

Semi-related - I'm in the middle of a substantial upgrade to all of the 
Shoreleave pieces (for Shoreleave 0.3), so stay tuned.

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to