Skip to content

Commit 8646e85

Browse files
committed
Update README with heroku deploy instructions
1 parent c91b122 commit 8646e85

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

Diff for: README.md

+30-5
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,59 @@
22

33
Simple crud app in Clojure
44

5-
## Running for development with temporary in process database:
6-
In ns user, through lein repl/cider etc.:
5+
### Development
6+
This uses an in-process/in-memory only database. In the `user` namespace, through `lein repl/cider` etc.:
77
```
88
(go) ;; to start the component system, localhost:3000 will serve the site
99
(reset) ;; to reset the whole component system
1010
```
1111

12-
## Running production uberjar (for heroku)
12+
### Running production uberjar (for heroku):
1313
```
1414
lein uberjar
1515
java -jar target/cljs-crud-prod-standalone.jar PORT DB-URL
1616
```
1717

18+
### Deploy on heroku
19+
First time, provision a postgrest database (see https://devcenter.heroku.com/articles/heroku-postgresql):
20+
```
21+
heroku addons:add heroku-postgresql:dev
22+
```
23+
First time and every time adding a migration:
24+
```
25+
heroku run lein migrate
26+
```
27+
Deploying:
28+
```
29+
git push heroku
30+
```
31+
1832
## Demo accounts
1933
Create your own through Signup or login using
2034
```
2135
Name: Admin Password: admin for the demo admin account.
2236
```
2337

38+
## Compiling the ClojureScript
39+
This requires a leiningen [checkout](https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies) of [DataScript](https://github.com/tonsky/datascript) with transaction functions.
40+
```
41+
lein cljsbuild auto dev ;; continues compilation for development
42+
lein cljsbuild test
43+
lein cljsbuild once local ;; advanced compilation for the client-side only demo
44+
```
45+
46+
2447
# Todo
25-
- Show password reset link in html when using debug emailer for demo
26-
- Show demo credentials on login page
2748
- Default to ssl on Heroku
2849
- Replace compojure with bidi
2950
- look into jdbc entities
3051
- use :base with liberator
3152
- secure headers etc from clojure.web/with-security
3253
- Walk through http://www.lispcast.com/clojure-web-security
54+
- Make pull requests for changes to anti-forgery
55+
- Sort out ring.middleware.session situation/documentation
56+
- Re-add something with Server-Sent Events, as done on the hackbattle2014 branch
57+
- Look into flywheel/browser-repl
3358

3459
## About
3560

0 commit comments

Comments
 (0)