Creating a Clojure solution using IntelliJ
I am creating a simple Clojure web app and API. In this post I explore
how to create each with the
lein command and what references I need to use.
I plan to work on a monolith IntelliJ and git solution so that I don't need to maintain multiple projects and repositories.
lein new re-frame kashikoi-app +less +garden +10x +re-frisk +test +handler +routes
+less: less - LESS CSS compiler plugin for Lein.
+garden: garden - Generate CSS with Clojure.
+re-frisk: re-frisk - A debugging dashboard for re-frame.
+10x: re-frame-10x - Visualize re-frame pattern data or reagent ratom data as a tree structure, watch re-frame events and export state in the debugger.
+test: clj.test - A unit testing framework and doo - A library and lein plugin to run cljs.test on different js environments.
+handler: compojure - A consice routing library for Ring/Clojure.
+routes: secretary - A client-side router for ClojureScript.
lein new app kashikoi-api
Follow the instructions to create an API using Compojure (web APIs, includes Swagger) and Toucan (define application models and retrieve them from a database).
Create a monolith solution by adding both projects to the solution. This is useful if you want to maintain a single repository instead of two.
- Create a blank project
- Import each module using the Leiningen external module option
- Set resources, sources and test directories
git initon solution
- Commit your files as desired
To access the modules dialog box again > Right-click on a project,
click on Open Module Settings or File > Project Structure or
Ctrl + Alt + Shift + S
- IntelliJ IDEA
- Developing RESTful APIs in Clojure Using Compojure-API and Toucan (Part-1) Codementor Community - Tamizhvendan S
- Day8 / re-frame template - Github