IntelliJ IDEA from JetBrains is one of the leading IDEs in the Java/Scala community, and it has excellent support for Akka HTTP. This section of the tutorial describes how to set up, test and run the sample project in IntelliJ.
To add the Akka HTTP example project to IntelliJ, follow these steps:
- Open IntelliJ.
- Select Open from the Welcome dialog or File > Open from the Editor.
- Browse to select the top-level directory of the sample project and click OK.
IntelliJ opens the project.
The main source file contains comments with special directives used by the documentation. To get rid of these lines, you can use IntelliJ’s awesome find and replace functionality. Follow these steps:
- From the Project pane, open the
- From the Edit menu, select Find > Replace.
- In the find box, enter
- Check Regex.
- Click Replace.
Voila the lines are gone!
In the Project pane, right-click the
QuickstartServer source file. Select Run ‘QuickstartServer’. The output should look like the output in the shell:
Congratulations! You can start building real-world applications that use Akka HTTP. Of course, we didn’t have time to cover all Akka HTTP features in this short guide. See the documentation to learn more.