Code Monkey home page Code Monkey logo

om-next-e2e's Introduction

om-next-e2e

This code is based on Mariano Guerra's blog posts:

I add here ability to update connected clients when server state changes. I.e. when you look at the page with counter value, and someone updates the counter (either via UI or via curl), the value of the counter should change in the UI without refreshing the page.

how to run it

Assuming you use Emacs+cider, and you configured your cider to start figwheel repl like this:

(setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))")

You can open the project.clj in emacs and hit Ctrl-c Alt-Shift-j to start both clojure and clojurescript REPLs. Then, in the clojure REPL, write (reset), it will start the backend on 8080.

Then navigate to http://localhost:8080, you should see the page with 'Increment' button. When you click on the button, the value of the "Counter" increments.

Now, run following in terminal:

echo '[(ui/increment {:value 20})]' | transito http post http://localhost:8080/api/1/query e2t -

You should see that the value of "Counter" increments by 20.

om-next-e2e's People

Contributors

stask avatar

Stargazers

John Omar avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.