Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndlano/backend
sbt-multiproject containing all scala-code for NDLA API's
https://github.com/ndlano/backend
elasticsearch http4s rest sbt sbt-multi-project scala tapir
Last synced: about 2 months ago
JSON representation
sbt-multiproject containing all scala-code for NDLA API's
- Host: GitHub
- URL: https://github.com/ndlano/backend
- Owner: NDLANO
- License: gpl-3.0
- Created: 2021-12-21T11:52:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T14:34:27.000Z (about 2 months ago)
- Last Synced: 2024-11-05T15:38:53.101Z (about 2 months ago)
- Topics: elasticsearch, http4s, rest, sbt, sbt-multi-project, scala, tapir
- Language: Scala
- Homepage:
- Size: 23.7 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NDLA backend monorepo
This is a [sbt-multiproject](https://www.scala-sbt.org/1.x/docs/Multi-Project.html) repository for NDLA scala backend projects.
This means this contains all scala backend components for the NDLA project.
There will be more detailed README's in the respective subdirectories.## Developer documentation
**Compile subproject**: `sbt test-api/compile`**Run tests:** `sbt test-api/test`
**Create Docker Image:** `sbt test-api/docker`
**Check code formatting:** `sbt test-api/checkfmt`
**Automatically format code files:** `sbt test-api/fmt`
**Generate typescript files:** `sbt test-api/generateTypescript`
You could run the sbt-tasks directly to execute the tasks for _all_ subprojects (IE: `sbt test`), this however can take a long time and in some cases even fail because of dependencies or jvm memory problems. We should improve upon this in the future, but for now it imposes no real problems.
**Check code formatting for everything:** `sbt scalafmtCheck scalafmtCheckSbt`
**Apply code formatting for everything:** `sbt scalafmt scalafmtSbt`
### IntelliJ jvm options
When using IntelliJ it is useful to setup required [jvmoptions](.jvmopts) in templates for `sbt task` and `scalatest` under
run/debug configurations.### Merging in sub-projects
When the sub-projects was merged in from the separate repositories we used the `git subtree` command.
This allows us to more easily maintain the separate repositories should we ever want to go back, or if we ever need to pull in changes from one of the separate repositories.Subtree merge strategy
### How to merge
- Run the subtree command to add:
- `git subtree add --prefix=test-api [email protected]:ndlano/test-api.git master`### How to pull changes in standalone repo:
- Run the subtree pull command:
- `git subtree --prefix=test-api [email protected]:ndlano/test-api.git master`### How to move back into standalone repo:
- Run the subtree command to push back:
- `git subtree push --prefix=test-api [email protected]:ndlano/test-api.git master`There can be some gotchas with viewing history from the standalone repositories in there, so we might consider merging the subprojects in directly (with `git merge --allow-unrelated-histories`) when can confirm this way of managing the backend projects is better.