/usermanager-reitit-example

A little demo web app in Clojure, using Integrant, Ring, Reitit, Selmer (and a database)

Primary LanguageClojure

Example Web Application in Clojure

This repo is a simple web application using Integrant, Ring, Reitit, and Selmer connected to a local SQLite database.

For learning purpose, I redid from scratch the very useful Sean Corfield’s usermanager repo and decided to move some libraries to learn them too in the process.

A Single Page App version that use Inertia-clojure library can be found here.

Requirements

This example assumes that you have the Clojure CLI installed, and provides a deps.edn file.

Clojure 1.10 (or later) is required. The “model” of this example app uses namespace-qualified keys in hash maps. It uses next.jdbc – the “next generation” JDBC library for Clojure – which produces namespace-qualified hash maps from result sets.

Usage

Run the Application

Clone the repo, cd into it, then follow below to Run the Application or Run the application in REPL. You can launch the application by directly calling the namespace which contains the -main function in an terminal

$ clj -m usermanager.system

or more conveniently, using an alias configured in deps.edn file.

$ clj -A:server

Now acces the app at: http://localhost:3000/.

Run the Application in REPL

$ clj -A:dev

Once REPL starts, run the system:

user=> (go)

Now acces the app at: http://localhost:3000/.

License & Copyright

Copyright (c) 2015-2020 Sean Corfield / Michaël SALIHI.

Distributed under the Apache Source License 2.0.