Running the application

To run the Akka-HTTP API, we have to use the same approach as we used for the http4s version. The name of the module will be, well, akkaHttp, but the principle is the same. The next screenshot shows the output in the console after akkaHttp/run was entered in the SBT shell:

The application outputs a few lines and then waits for incoming requests. It is now safe to play with it the same way we did with the http4s version:

One subtle but important difference is that the Akka version persists the database into the filesystem and retains the state between restarts, as shown by the first request on the previous screen.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.212.212