Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.52 KB

README.md

File metadata and controls

71 lines (49 loc) · 2.52 KB

dawn

Fast start for a Clojure + Pedestal + Vase + Fern project

Fork this to your project, then fire up a Codespace to get started.

You'll probably want to change "dawn" to your project's name. Be sure to make the same change in deps.edn, shadow-cljs.edn and the various folder names.

Included in this starter

Starting a REPL

These instructions are for a codespace using VS Code (either in a browser or running locally with a remote connection).

To get a Clojure REPL:

  1. Configure your .m2/settings.xml for access to download Datomic. (See below for instructions.)
  2. Click the nREPL badge in the status bar
  3. Select the "jack in" option
  4. For project type, select "Clojure CLI"
  5. Use the :dev alias

To get a CLJS REPL:

  1. Click the nREPL badge in the status bar.
  2. Select the "jack in" option
  3. For project type, select "shadow-cljs"
  4. Use :app for the build to start

Shadow-cljs will run an HTTP server at http://localhost:8020. To access this port, select the "Remote Explorer" tool from the left-hand navigation in your VS Code window. Under "Codespace Details" you will see "Forwarded Ports". Click "Port: 8020" to open a new tab connected to the shadow-cljs server.

To change this port number, modify forwardPorts in .devcontainer/devcontainer.json and the value at [:builds :app :dev-tools] in shadow-cljs.edn. After making this change, you must commit it, push it to your fork of Dawn, and start a new codespace.

Aliases

Clojure

  • :dev - Start a friendly REPL
  • :test - Run all tests

Shadow-CLJS

  • :app - Build the main application,

Fetching Datomic Client Jar

Vase depends on Datomic. You will need to set up ~/.clojure/deps.edn and ~/.m2/settings.xml according to the instructions at my.datomic.com in order to fetch the Datomic Pro jar file from repo.datomic.com.

Codespaces users will want to look at setting up personal dotfiles to make that easier.

If you do not want to use Datomic, remove both com.cognitect/vase and com.datomic/datomic-pro from deps.edn.