base/src/sqwl/cms/Server.scala
changeset 7 50a354e5bda4
parent 4 1a1347e8c5be
child 13 216da61215db
equal deleted inserted replaced
6:ba89bccede7e 7:50a354e5bda4
    43       } ~ path(TAG / asTag) { tag =>
    43       } ~ path(TAG / asTag) { tag =>
    44         complete(asHtml(ViewTag(tag)))
    44         complete(asHtml(ViewTag(tag)))
    45       }
    45       }
    46     } ~ pathPrefix(http.prefix / ASSETS) {
    46     } ~ pathPrefix(http.prefix / ASSETS) {
    47       getFromResourceDirectory("META-INF/resources/webjars")
    47       getFromResourceDirectory("META-INF/resources/webjars")
       
    48     } ~ pathPrefix(http.prefix / PUBLIC / content.icon._1) {
       
    49       getFromFile(content.icon._2.toFile)
       
    50     } ~ pathPrefix(http.prefix / PUBLIC / content.styleSheet._1) {
       
    51       getFromFile(content.styleSheet._2.toFile)
    48     } ~ pathPrefix(http.prefix / PUBLIC) {
    52     } ~ pathPrefix(http.prefix / PUBLIC) {
    49       getFromResourceDirectory("public")
    53       getFromDirectory(content.publicAssets.toString)
    50     }
    54     }
    51   }
    55   }
    52 
    56 
    53   Http().bindAndHandle(routes, http.interface, http.port)
    57   Http().bindAndHandle(routes, http.interface, http.port)
    54   system.log.info("Click `Enter` to close application...")
    58   system.log.info("Click `Enter` to close application...")