This simple app aim to train construction using juxt’s edge (yada) web solution
cd ./wiz.blog.api
touch .env
echo "\
PORT=5757 \
PROTOCOL=http \
HOST=localhost \
DB_USER=<db-user> \
DB_PASSWORD=<db-pass> \
DB_NAME=<db-name> \
DB_HOST=<db-host> \
DB_PORT=<db-port \
" >> .env
currently same info have to be repeated in config.edn and revolt.edn
# start DB
docker-compose up -d
# by default only schema applied, data seed should be thrown separately clj -A:dev:migrate -t revolt.migrations.task/flyway:action=migrate
clj -A:dev:repl-migration
(info)
+-----------+---------+---------------+------+---------------------+---------+ | Category | Version | Description | Type | Installed On | State | +-----------+---------+---------------+------+---------------------+---------+ | Versioned | 1 | Create tables | SQL | 2019-11-28 23:25:45 | Success | +-----------+---------+---------------+------+---------------------+---------+
;; Also overrides to config are possible
(info {:locations ["db/migrations" "db/seed"]})
+-----------+---------+------------------+------+---------------------+---------+ | Category | Version | Description | Type | Installed On | State | +-----------+---------+------------------+------+---------------------+---------+ | Versioned | 1 | Create tables | SQL | 2019-11-28 23:25:45 | Success | | Versioned | 2 | Insert test data | SQL | | Pending | +-----------+---------+------------------+------+---------------------+---------+
(migrate {:locations ["db/migrations" "db/seed"]})
;; to seed db with test data
clj -A:dev:test:repl
M-x -> cider-connect ;; alternatively , s c ;; in Spacemacs
(go) ;; starts web server
(reset) ;; reset all app namespaces (like HMR on front-end)
If application have been started as suggested in Start development section
then it’s just , t a
in Spacemacs which runs cider-test-run-all-tests
function underneath