Skip to content

Commit

Permalink
[#7] Prototype of static site generator using in memory database.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpetrov committed Jan 29, 2017
1 parent 7adc3d3 commit 7969f55
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion profiles.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
:log-file-path "logs/kmg.log"
:sample-data-path "test/kmg/sample_data.edn"
:real-data-path "resources/knowledge_base4it.edn"}}
:test {:env {:database-url "datomic:mem://test"}}}
:test {:env {:database-url "datomic:mem://test"}}
:stsg {:env {:database-url "datomic:mem://test"
:real-data-path "resources/knowledge_base4it.edn"}}}
2 changes: 1 addition & 1 deletion src/kmg/datomic_helpers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

(defn create-db-and-import-sample-data-for-test
"This function creates schema and imports knowledge base data and users sample data
It needs only for test in memory database. Does not work with real database, for some reason"
It needs only for test in memory database."
[]
(let [data-path (env :sample-data-path)]
(import-knowledge-base-data data-path (fresh-conn))))
Expand Down
12 changes: 12 additions & 0 deletions src/kmg/static_site_generator.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(ns kmg.static-site-generator
(:require
[kmg.datomic-helpers :as dh]
[kmg.domain-facade :as model]
[kmg.view :as view]))

(defn prototype []
(dh/create-db-and-import-knowledge-base-4-it)
(->> (model/whole-user-data "user1")
view/base
view/render
println))

0 comments on commit 7969f55

Please sign in to comment.