caribou / caribou-frontend Goto Github PK
View Code? Open in Web Editor NEWPage routing for caribou projects
Page routing for caribou projects
I think this should be moved to caribou-development and end up in a user's boot.clj on app creation (probably commented)
Right now, a new app makes it difficult to see what's configurable without looking at caribou's source:
(defn boot
[]
(let [default (app-config/default-config)
config (config/config-from-environment default)]
(caribou/init config)))
versus what's in caribou.app.config (the app-config map in particular)
(defn default-config
[]
(let [core-config (config/default-config)
app-config {:app {:public-dir "public"
:default-locale "global"
:localize-routes ""}
:controller {:namespace "skel.controllers"
:reload true
:session-defaults (atom {})}
:actions (atom {})
:pages (atom ())
:routes (atom (flatland/ordered-map))
:handler (atom nil)
:reset (atom nil)
:pre-actions (atom {})
:template {:helpers (atom {})
:cache-strategy :never}
:error {:handlers (atom {})
:templates (atom {})
:show-stacktrace false}
:cljs {:root "resources/cljs"
:reload false
:options
{:output-dir "resources/public/js/out"
:pretty-print true}}
:i18n {:enabled false
:locales (atom ())
:resource-map (atom {})}
:middleware (atom [])}]
;; :halo {:enabled true
;; :hosts ["http://localhost:33333"]
;; :key "halo-caribou"
;; :prefix "/_halo"
;; :hooks (atom {:reload-pages pages/create-page-routes
;; :reload-models model/invoke-models
;; :reload-halo halo/generate-routes
;; :halo-reset identity})
;; :routes (atom [["GET" "reload-routes" reload-pages]
;; ["GET" "reload-halo" reload-halo]
;; ["GET" "reload-models" reload-models]])}}]
(util/deep-merge-with
(fn [& args]
(last args))
core-config
app-config)))
Operating system: windows 7
lein -version
Leiningen 2.3.2 on Java 1.7.0_40 Java HotSpot(TM) 64-Bit Server V
lein new caribou tundra
cd tundra
lein caribou migrate resources/config/development.clj
lein ring server
curl http://localhost:33333/_admin/login
No template by the name login.html
We need to wrap the Ring request map with a function that adds a boolean "is_xhr" (not "is-xhr" since it will be used in templates) key to the map. It should determine if the request was made through XHR by inspecting the "X-Requested-With" header.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.