Metadata (Scala)
Documentation
Document | URL |
---|---|
CLI documentation | CLI.md |
Database models | Database.md |
CONTRIBUTING | CONTRIBUTING.md |
OpenAPI specification | Specification |
Development
Local database
- Run the
docker-compose
command:
docker-compose -f docker-compose.dev.yml up
- (Optional) Open the
pgadmin
page inhttp://localhost:5050/
and login with the following credentials:
Password | |
---|---|
postgres@postgres.com | postgres |
Note that sometimes the pgadmin
container doesn't start properly, so you'll need to run the command again. This usually occurs the first time you run the command.
- (Optional) Create a new server in
pgadmin
with the following credentials:
Field | Value |
---|---|
Host | postgres-db |
Port | 5432 |
Maintenance database | metadata |
User | postgres |
Password | postgres |
Create packages
You can create new packages with default folders (domain
, application
, infraestructure
and test
) using the following command:
make create
After running the command you'll be prompted to enter the name of the package.
Remove packages
You can remove packages using the following command:
make remove
After running the command you'll be prompted to enter the name of the package.
Testing
- Make sure you have
sbt
installed in your computer:
sbt --version
- Setup the local database:
docker-compose up
- Run the tests and generate the coverage report:
sbt clean coverage test coverageReport
Or:
make coverage
- (Optional) Open the
html
coverage file located in:
cd target/scala-2.13/scoverage-report