This is a toy & learning application. I use it to learn Clojure web development. Do not assume that I know what I’m doing. It is probably not safe to use this code.
This repo is only public for two reasons:
- I’m too cheap to shell out for a private GitHub account, but want to access the repo from different machines.
- I occassionally ask for help with things and need to point to the repo.
Specifically, what I’m toying with here is:
- Building webapps in Clojure, but more specifically using
- Duct by James Reeves, and
- Some ideas around passwordless registration and login.
When you first clone this repository, run:
lein setupThis will create files for local configuration, and prep your system for the project.
To begin developing, start with a REPL.
lein replRun `go` to initiate and start the system.
user=> (go)
:startedBy default this creates a web server at http://localhost:3000.
When you make changes to your source files, use `reset` to reload any modified files and reset the server. Changes to CSS or ClojureScript files will be hot-loaded into the browser.
user=> (reset)
:reloading (...)
:resumedIf you want to access a ClojureScript REPL, make sure that the site is loaded in a browser and run:
user=> (cljs-repl)
Waiting for browser connection... Connected.
To quit, type: :cljs/quit
nil
cljs.user=>Testing is fastest through the REPL, as you avoid environment startup time.
user=> (test)
...But you can also run tests through Leiningen.
lein testMigrations are handled by [ragtime][]. Migration files are stored in the
resources/migrations directory, and are applied in alphanumeric order.
To update the database to the latest migration, open the REPL and run:
user=> (migrate)
Applying 20150815144312-create-users
Applying 20150815145033-create-postsTo rollback the last migration, run:
user=> (rollback)
Rolling back 20150815145033-create-postsNote that the system needs to be setup with (init) or (go) before
migrations can be applied.
This project has several generators to help you create files.
lein gen endpoint <name>to create a new endpointlein gen component <name>to create a new component
FIXME: steps to deploy
Copyright © 2015 Stig Brautaset