Simple crud app in Clojure
This uses an in-process/in-memory only database. In the user
namespace, through lein repl/cider
etc.:
(go) ;; to start the component system, localhost:3000 will serve the site
(reset) ;; to reset the whole component system
lein uberjar
java -jar target/cljs-crud-prod-standalone.jar PORT DB-URL
First time, provision a PostgreSQL database (see https://devcenter.heroku.com/articles/heroku-postgresql):
heroku addons:add heroku-postgresql:dev
First time and every time adding a migration:
heroku run lein migrate
Deploying:
git push heroku
Create your own through Signup or login using
Name: Admin Password: admin for the demo admin account.
lein cljsbuild auto dev ;; continues compilation for development
lein cljsbuild test
lein cljsbuild once local ;; advanced compilation for the client-side only demo
lein cljsbuild once prod ;; advanced compilation for production
- Default to ssl on Heroku
- Replace compojure with bidi
- look into jdbc entities
- use :base with liberator
- secure headers etc from clojure.web/with-security
- Walk through http://www.lispcast.com/clojure-web-security
- Make pull requests for changes to anti-forgery
- Sort out ring.middleware.session situation/documentation
- Re-add something with Server-Sent Events, as done on the hackbattle2014 branch
- Look into figwheel/browser-repl
Mock sending password reset emailGhost user accounts as adminAdd anti-forgery checkAdd transaction functions to Datascript
Written by: Gijs Stuurman / @thegeez / Blog / GitHub
Copyright © 2014 Gijs Stuurman
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.