A fast CLJS setup for BYU ODH applications.
With this setup, the features/stack are as follows:
- Tests set up for TDD
- Stories for use elaboration
- Unit tests for coverage
- A setup expecting deployment on a shared server
- re-frame as a SPA state-management framework upon react.js
- reitit for front-end and back-end routing
- cprop for inclusion of local and environmental variables
- mount for a component/reloaded workflow
- Configured for Postgresql database specified in your config.edn (see below)
- hikari-cp for JDBC database connection pooling
- hiccup for SSR (server-rendered) base-page
- CSS with garden and garden-gnome for hot-reloading as you define your styles as unadorned clojure
- migratus for database initialization and migrations
- figwheel for state-preserving hot-reloading of the browser as soon as you save a change in a cljs file
Other configuration based on luminus
The rename.sh script expects you to be using a system with grep, sed, find and rename commands installed.
- acquire this repo
cd REPO-DIRchmod +x rename.sh- execute
./rename.sh <MY-DESIRED-PROJECT-NAME>to reconfigure all the paths the way you want cp env/dev/resources/config_sample.edn env/dev/resources/config.ednand edit config.edn to specify database credentials, startup port, and any other environmental state your app will refer utilize.
At this point you are welcome to use lein run to start the server; you will now be able to view the application by pointing a browser to http://localhost:3030.
lein figwheel start will then start the front-end hotloading as you edit cljs files.
Copyright © 2020 Brigham Young University