You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Since the acceptance and unit test from different bounded context run in parallel, I had to split the acceptance ones in a different database
* Move the docker things to the root directory in order to follow the same convention as with other DDD example repos
* Update MySQL container image version and connector library in order to avoid SSL errors (not acomplished, so disabled SSL. It's due to an error with JVM >= 11)
* Rename project from Scala HTTP API to CQRS DDD Scala Example in the `README.md` and other points such as the container names and application JAR
* Fix run command trying to run a non existing `Launcher` class (it was named after `Starter`, now it's renamed)
* Fix backoffice consumers application launching
@@ -57,23 +57,29 @@ One of the goals of this project is to serve as an example for the [course on Sc
57
57
## Environment setup
58
58
59
59
### Install the needed tools
60
-
1. Clone this repository: `git clone https://github.com/CodelyTV/scala-http-api.git scala-http-api`
60
+
1. Clone this repository: `git clone https://github.com/CodelyTV/cqrs-ddd-scala-example.git cqrs-ddd-scala-example`
61
61
2. Download and install [Docker compose](https://docs.docker.com/compose/install/). We'll need it in order to run all the project infrastructure.
62
62
3. Download and install [SBT](http://www.scala-sbt.org/download.html)
63
63
64
64
### Prepare the application environment
65
-
1. Copy [the Docker environment variables config file](docker/.env.dist) and tune it with your desired values: `cp docker/.env.dist docker/.env`
66
-
2. Start Docker and bring up the project needed containers: `cd docker/; docker-compose up -d; cd ..`
65
+
1. Copy [the Docker environment variables config file](.env.dist) and tune it with your desired values: `cp .env.dist .env`
66
+
2. Start Docker and bring up the project needed containers: `docker-compose up -d`
67
67
3. Create the database tables in your Docker MySQL container: `sbt createDbTables`
68
68
69
69
### Run the tests and start the HTTP server
70
70
1. Enter into the SBT console: `sbt`
71
71
2. Run the tests: `t`
72
-
3. Start the local server: `run`
72
+
3. Start the local server: `app/run mooc-api` (if you run the app from outside SBT: `sbt "app/run mooc-api"`)
73
73
4. Request for the server status: `curl http://localhost:8080/status`
74
74
5. Take a look at the courses related to this repository (Spanish) just in case you're interested into them!
75
75
*[Introducción a Scala](https://pro.codely.tv/library/introduccion-a-scala/63278/about/)
76
76
*[API HTTP con Scala y Akka](https://pro.codely.tv/library/api-http-con-scala-y-akka/66747/about/)
77
+
*[Programación funcional: Refactorizando código orientado a objetos con TypeClasses](https://pro.codely.tv/library/programacion-funcional-refactorizando-codigo-orientado-a-objetos-con-typeclasses/about/)
*[Comunicación entre microservicios: Event-Driven Architecture](https://pro.codely.tv/library/comunicacion-entre-microservicios-event-driven-architecture/74823/about/)
@@ -100,17 +106,17 @@ If you want more information on the logging policies and appenders, [take a look
100
106
We use [SBT Native Packager](http://sbt-native-packager.readthedocs.io/en/latest/) in order to package the app in single Jar file that you can execute.
101
107
102
108
1. Create the universal package: `sbt universal:packageBin`.
103
-
2. Extract the generated zip: `unzip target/universal/codelytv-scala-http-api-1.0.zip -d ~/var/www/` which will contain:
109
+
2. Extract the generated zip: `unzip target/universal/codelytv-cqrs-ddd-scala-example-1.0.zip -d ~/var/www/` which will contain:
104
110
*`bin/`: All the executable binaries of our main classes in Unix and Windows (bat) format
105
111
*`lib/`: All the project dependencies jar files.
106
112
3. Run the main app binary:
107
-
* Without specifying any parameters (OK for this example app): `~/var/www/codelytv-scala-http-api-1.0/bin/codelytv-scala-http-api`
108
-
* Specifying parameters for the JVM: `~/var/www/codelytv-scala-http-api-1.0/bin/codelytv-scala-http-api -Dconfig.resource=application/$CONFIG_PATH`
* Without specifying any parameters (OK for this example app): `~/var/www/codelytv-cqrs-ddd-scala-example-1.0/bin/codelytv-cqrs-ddd-scala-example`
114
+
* Specifying parameters for the JVM: `~/var/www/codelytv-cqrs-ddd-scala-example-1.0/bin/codelytv-cqrs-ddd-scala-example -Dconfig.resource=application/$CONFIG_PATH`
This hopefully helpful utility has been developed by [CodelyTV](https://github.com/CodelyTV) and [contributors](https://github.com/CodelyTV/scala-http-api/graphs/contributors).
119
+
This hopefully helpful utility has been developed by [CodelyTV](https://github.com/CodelyTV) and [contributors](https://github.com/CodelyTV/cqrs-ddd-scala-example/graphs/contributors).
114
120
115
121
We'll try to maintain this project as simple as possible, but Pull Requests are welcome!
0 commit comments