Skip to content

A working Clojure template with scripts to hit the ground running

Notifications You must be signed in to change notification settings

BYU-ODH/clojure-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick CLJ Setup

A fast CLJS setup for BYU ODH applications.

The Stack

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

Getting Started

The rename.sh script expects you to be using a system with grep, sed, find and rename commands installed.

  1. acquire this repo
  2. cd REPO-DIR
  3. chmod +x rename.sh
  4. execute ./rename.sh <MY-DESIRED-PROJECT-NAME> to reconfigure all the paths the way you want
  5. cp env/dev/resources/config_sample.edn env/dev/resources/config.edn and 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.

License

Copyright © 2020 Brigham Young University

About

A working Clojure template with scripts to hit the ground running

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published