This repository contains an empty Scala/Cats project for use in Spacecat training courses.
Licensed Apache 2.0.
- 
To use this repo you'll need to install a Java 11+ compatible JDK. We recommend using Sdkman to do this: sdk list java sdk install java <VERSION_TAKEN_FROM_THE_LIST> 
- 
Clone this repository to a directory on your hard drive: git clone https://github.com/spacecatio/cats-sandbox.git cd cats-sandbox
- 
Run the sbt.shscript (or use your own locally installed SBT):./sbt.sh # Lots of output here. The first run will take a while. # You'll see an SBT prompt as follows: sbt:sandbox> run 
- 
Type runat the SBT prompt to run the sample app:sbt:sandbox> run # Lots of output here. The first run will take a while. # You should finally see the following output: Hello world! 
- 
Type exitto quit the SBT prompt when you're done:sbt:sandbox> exit 
If you don't have a particular preference for a Scala editor or IDE, we recommend you use Visual Studio Code and a Linux or macOS terminal.
Ideally you should have the code command set up in your terminal, in which case:
cd cats-sandbox
code .If you don't have the command installed, you can open the code from the file menu:
- Choose File Menu > New Window
- Choose File Menu > Open Folder... and select the repo root folder
We recommend using your terminal to compile and run your code.
You can optionally install the Metals plugin to add IDE-like features for editing Scala in VSCode. However, please take the time to get this working correctly before your course.
If you prefer to edit Scala code using IntelliJ IDEA:
- Make sure you have the Scala plugin installed
- Choose File Menu > Open... and select the build.sbtfile from the repo root folder
- Choose "Open as Project"