/fulcro-rad-demo

A demo for Fulcro RAD using either SQL or Datomic databases.

Primary LanguageClojure

Fulcro RAD Demo

This is a demo repository for Fulcro RAD. It includes a shared source directory of files that would be common to any project, and then separate source directories that have specific files that would be needed to work with specific back-end technologies (currently SQL and Datomic).

Building the SPA

You must compile the CLJS source to run the client. If you want to be able to edit it, just start a shadow-cljs watch:

$ yarn
$ shadow-cljs watch example

Running an SQL-based Sever

The example code should work with most SQL databases, and the data source is configured in the defaults.edn config file in the sql source directory. See the HikariCP connection pool documentation.

The SQL example has a custom development namespace in the src/sql source folder, along with components needed to run that server.

You can start the server-side version for SQL using the deps aliases that set up the proper classpath:

$ clj -A:dev:sql
user=> (require 'development)
user=> (development/go)

Running a Datomic-based Sever

The example code for Datomic components is in the src/datomic folder, along with a custom development.clj.

Install Datomic, and configure it for a PostgreSQL storage engine, then update the config parameters in defaults.edn in the src/datomic/config directory to have the correct connection parameters.

Then you can run it with the correct classpath using:

$ clj -A:dev:datomic
user=> (require 'development)
user=> (development/go)