Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 549 Bytes

Step1.md

File metadata and controls

18 lines (15 loc) · 549 Bytes

Step 1 - Serving a simple page from spray

  • Change the root path to serve HTML instead of the plain text. You may start with this code:
<html>
   <body>
       <div>Hello World</div>
   </body>
</html>
  • Now add a picture or css to the html and serve it from a resource.
    • Create web directory inside the src/main/resources folder
    • Put an image file into
    • add an image tag to your html code
    • Add spray-routing code to serve files from the web resource directory