layout | title |
---|---|
doc-page |
Development |
- Run the local database with Docker
$ cd docker
$ docker compose -f ./docker-compose.local.yml up
- create author
$ sbt
$ sbt:qualtet> createOrUpdateAuthor <name> <displayName> <password>
- Shut down Docker once step
1.
is complete
$ docker compose down
- Run the local server with the sbt command
$ cd <source code dir>
$ sbt run
Multiple main classes detected. Select one to run:
[1] net.yoshinorin.qualtet.BootStrap
[2] net.yoshinorin.qualtet.tasks.CreateOrUpdateAuthor
Enter number: 1
$ sbt
$ sbt:qualtet> ~reStart
Run scalafmt
& kill current server
before start server(Hot reload)
$ sbt
$ sbt:qualtet> runs
$ sbt
$ sbt:qualtet> kills
$ sbt
// start up local db using by docker
$ sbt:qualtet> localDbUp
// shutdown local db
$ sbt:qualtet> localDbDown
$ sbt:qualtet> scalafmt
Run all tests with db (docker container)
$ sbt testWithDb
Run specific test
# NOTE: Many of test depends on DB. This command may not works well...
$ sbt
$ sbt:qualtet> testOnly *xxxxxSpec
Generate Coverage report
$ sbt coverageReport
or
$ sbt clean coverage testWithDb coverageReport
sbt:qualtet> dependencyUpdates
[info] Found 8 dependency updates for qualtet
...
[success] Total time: 3 s, completed 2022/12/27 12:00:26
sbt:qualtet>
// git log --pretty=format:"* (%h) %s" <tag>..<tag> | tac
$ git log --pretty=format:"* (%h) %s" v2.5.0..v2.6.0 | tac
$ cd <source code dir>
$ sbt
...
[info] started sbt server
sbt:qualtet> ~compile
[success] Total time: 1 s, completed 2021/05/12 2:49:37
[info] 1. Monitoring source files for qualtet/compile...
[info] Press <enter> to interrupt or '?' for more options.
$ sbt assembly
$ cd ./docs/api
$ npm run serve
Server started: http://127.0.0.1:8080
$ sbt doc
Serve generated docs locally.
$ cd ./docs/dist
$ python -m http.server 8080