Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 2.24 KB

run.md

File metadata and controls

96 lines (73 loc) · 2.24 KB

Pre-Run

  1. Create profiles.clj file:

    Example
    {:provided {:env {:database-url "jdbc:postgresql://localhost/webchange?user=webchange&password=webchange"
                      :public-dir   "resources/public"
                      :upload-dir   "resources/public/upload"
      				:session-key  "1234567890abcdef"
                      :hardcoded-courses {"test" true}         ;; which course take from hardcoded edn
                      :dev?              true                     ;; is dev environment? 
                                                                  ;; affects on the way how resources list for sw are taken
     }}
     :test     {:env {:database-url "jdbc:postgresql://localhost/webchange_test?user=webchange&password=webchange"
                      :public-dir   "resources/public"
                      :upload-dir   "resources/public/upload"}}}
    
  2. Prepare DB

    2.1 Apply migrations:

    $ lein migratus migrate
    $ lein with-profile test migratus migrate
    

    2.2. Load datasets:

    $ lein run load-dataset-force spanish concepts
    $ lein run load-dataset-force english concepts
    $ lein run update-character-skins
    $ lein run update-editor-assets
    
  3. Download raw data from google disk store to resources/public/raw/

  4. Clean:

    $ lein clean
    
  5. Build styles:

    $ lein sass once
    
  6. Build service worker:

    $ lein cljsbuild once sw
    

Run

  • Run back:

    $ lein repl
    
        webchange.server=> (dev)
    
  • Run front:

    $ lein figwheel dev
    
  • Wait a bit, then browse to localhost:3000. Figwheel will automatically push cljs changes to the browser.

  • Enable voice recognition:

    • Download docker image:

      $ docker pull webchange/webchange-voice-recognition:latest
      
    • Run it:

      $ docker run  webchange/webchange-voice-recognition:latest
      
    • Check status:

       $ docker containter ps
      
    • Stop container:

       $ docker stop <container-id>