Skip to content

Developer Guideline

Sohaib Iftikhar edited this page Oct 9, 2019 · 2 revisions

Cluster Broccoli runs using the play-framework. At present we use play 2.6.

The following packages must be available on the system before attempting to build from source:

  • JDK8 (Higher version are not supported by Play 2.6.X)
  • sbt (The project uses 0.13.16. But you can use a higher version and sbt reconfigures accordingly.)
  • node (has been tested against v12.11.1)
  • yarn (has been tested against 1.19.0)

Useful Commands

  • To compile the server sbt server/compile.
  • To run the server locally sbt server/run. Starts the server at localhost:9000.
  • To run the unit tests for the backend: sbt server/test.
  • To run the unit tests for the frontend: sbt webui/yarnTest.
  • To run the Scala-based integration tests: sbt it:test. The other tests run using the http-api-tester and will be migrated in the future.
  • To validate formatting for Scala source: ./scalafmt --test
  • To validate formatting for Elm source: sbt webui/yarnFormatValidate.

You can also skip sbt for yarn commands and go inside the webui directory and run yarn commands directly from there. See the scripts section in package.json to see the list of available commands.

If you are developing the frontend and do not like to kill the server and re-run the server/run every time you make a change you can use the following steps:

  • Start the server as before: sbt server/run
  • In a different terminal window/tab go inside the webui directory and run the command yarn start. This starts another server at localhost:8080 that reflects the changes made to the frontend without the need for restarting.
Clone this wiki locally