Skip to content

Add ui component - #4

Open
atomkevich wants to merge 26 commits into
scalalab3:masterfrom
atomkevich:master
Open

Add ui component#4
atomkevich wants to merge 26 commits into
scalalab3:masterfrom
atomkevich:master

Conversation

@atomkevich

Copy link
Copy Markdown

No description provided.

@bazarevsky

Copy link
Copy Markdown
Contributor

Cool. Could you please ensure your project stucture conform existing in repository?

@atomkevich

Copy link
Copy Markdown
Author

I'm so sorry. I'll fix it. Thanks)

@atomkevich

Copy link
Copy Markdown
Author

Thank you Valentine for your comments, i've fixed corresponding
mistakes

path("home") {
get {
respondWithMediaType(MediaTypes.`text/html`) {
val homePage = Source.fromURL(this.getClass.getResource("/index.html")).mkString

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you serve all your static data through api module?
api and client should be independent applications. You can also have multiple different clients that work with the same api.
I would recommend to serve it using some http server like nginx instead.

atomkevich and others added 8 commits May 5, 2016 12:27
# Conflicts:
#	README.md
#	api/build.sbt
#	api/src/main/scala/scalalab3/lyricsengine/Boot.scala
# Conflicts:
#	README.md
#	api/build.sbt
#	api/src/main/scala/scalalab3/lyricsengine/Boot.scala
Move client files around
pathPrefix("js") {
get {
getFromResourceDirectory("js")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сервинг статики хорошо бы отделить от бизнес-логики. В идеале скала вообще не должна её сёрвить, это лучше поручить какому nginx-у. Ну или хотя бы отделить в отдельный роут.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, извините, это уже пофиксано. ui component отдельный модуль ни от чего не зависящий

# Conflicts:
#	README.md
#	api/build.sbt
#	api/src/main/scala/scalalab3/lyricsengine/Boot.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants