Skip to content

A reactive SPA(demo) powered by Hoplon and Datomic/DataScript.

Notifications You must be signed in to change notification settings

sagehan/miaom-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miaomfood

A simple demo built with full clojure(script) technology stack which use hoplon framework to achieve reactive!

Bonus, the design prototype is also included within this repo, you can find sketch file under Design directory! Without my approval ,you have no rights to reuse this design prototype in any business product, it just for learning use case!

I recommend you guys read this article: The Web After Tomorrow.

This project mainly uses those technology:

  1. Hoplon Reactive framework which compete with react/Om.
  2. Datomic Distributed NoSQL database.
  3. datascript Front-end NoSQL memory database, mock datomic!

Dependencies

Usage

To follow this guide, you need to change to directory Code/app_Web/miaomfood!

Startup Datomic transactor!

Before any playing around, please make sure that datomic transactor is running! You can read this article to get start!

Play Around

  1. you can play with this demo quickly after start datomic transactor like this!

     $ boot play

Front-end Development

  1. Start the cljs-dev task. In a terminal run:

    $ boot cljs-dev

    This will give you a Hoplon development setup with:

    • auto compilation on file changes
    • audible warning for compilation success or failures
    • auto reload the html(and other static files like .css, .hl) page on changes
    • Clojurescript REPL
  2. Go to http://localhost:8000 in your browser. You should see the SPA page.

  3. If you edit and save a file, the task will recompile the code and reload the browser to show the updated version.

Back-end Development

  1. First

    $ boot cider repl

    , or just run:

    $ boot repl
  2. In repl, start dev task:

    boot.user=> (dev)
    
  3. Start the server:

    boot.user=> (start)
    

Production

  1. Run the prod task. In a terminal run:

    $ boot prod
  2. The compiled files will be on the target/ directory. This will use advanced compilation and prerender the html.

License

Copyright © 2016 Truewen. All rights reserved. Licensed under Eclipse Public License (see LICENSE).

About

A reactive SPA(demo) powered by Hoplon and Datomic/DataScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published