GithubHelp home page GithubHelp logo

scala-ddd-example's Introduction

Scala DDD Example

License Build Status Coverage Status

References

Command for create this project

Command for enter to sbt console

  • sbt

Command for run tests (in sbt console)

  • t

Command for all tasks before pushing to repository (in sbt console)

  • prep

Command for run server (in sbt console)

  • run

Command for reload sbt console

  • reload

Command for exit from sbt console

  • exit

Command for test server status from console

  • curl localhost:8080/status

Prepare the application evironment

  1. Copy the Docker environment variables config file and tune it with your desired values: cp docker/.env.dist docker/.env
  2. Start Docker and bring up the project needed containers: cd docker/; docker-compose up -d
  3. Create the database tables in your Docker MySQL container: sbt createDbTables

Command example for run specifics tests

  • testOnly *DoobieMySqlUserRepositoryShould

URL for RabbitMQ Management

Deploy

We use SBT Native Packager in order to package the app in single Jar file that you can execute.

  1. Create the universal package: sbt universal:packageBin.
  2. Extract the generated zip: unzip target/universal/codelytv-scala-http-api-1.0.zip -d ~/var/www/ which will contain:
    • bin/: All the executable binaries of our main classes in Unix and Windows (bat) format
    • lib/: All the project dependencies jar files.
  3. Run the main app binary:
    • Without specifying any parameters (OK for this example app): ~/var/www/codelytv-scala-http-api-1.0/bin/scala-http-api
    • Specifying parameters for the JVM: ~/var/www/codelytv-scala-http-api-1.0/bin/scala-http-api -Dconfig.resource=application/$CONFIG_PATH
    • Specifying application parameters: ~/var/www/codelytv-scala-http-api-1.0/bin/scala-http-api -Dconfig.resource=application/$CONFIG_PATH -- -appParam

scala-ddd-example's People

Contributors

jorgechavezrnd avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.