Improve fixtures and media loader entry points.

This commit is contained in:
Andrey Antukh
2020-04-08 13:54:30 +02:00
parent a9b2951d8b
commit d737069ef9
4 changed files with 50 additions and 22 deletions

View File

@@ -10,9 +10,8 @@ This is a development feature that allows populate the database with a
good amount of random content (usually used for just test the
application or perform performance tweaks on queries).
In order to load fixtures, enter to the REPL environment executing the
`bin/repl` script, and then execute `(uxbox.fixtures/-main)`.
`bin/repl` script, and then execute `(uxbox.fixtures/run :small)`.
You also can execute this as a standalone script with:

View File

@@ -36,6 +36,18 @@ respective defaults):
- `UXBOX_DEBUG_HUMANIZE_TRANSIT=true`
## REPL ##
The production environment by default starts a server REPL where you
can connect and perform diagnosis operations. For this you will need
`netcat` or `telnet` installed in the server.
```bash
$ rlwrap netcat localhost 5555
user=>
```
## Collections import ##
This is the way we can preload default collections of images and icons to the
@@ -64,3 +76,10 @@ Then, you need to execute:
```bash
clojure -Adev -m uxbox.media-loader ../path/to/config.edn
```
If you have a REPL access to the running process, you can execute it from there:
```clojure
(require 'uxbox.media-loader)
@(uxbox.media-loader/run "/path/to/config.edn")
```