This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import javax.inject._ | |
import play.api.Configuration | |
import play.api.http.HttpErrorHandler | |
import play.api.mvc._ | |
/** | |
* Frontend controller managing all static resource associate routes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import javax.inject._ | |
import play.api.Configuration | |
import play.api.http.HttpErrorHandler | |
import play.api.mvc._ | |
/** | |
* Frontend controller managing all static resource associate routes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── /app/ # The backend source (controllers, models, services) | |
│ └── /controllers/ # Backend controllers | |
│ └── FrontendController.scala # Asset controller wrapper serving frontend assets and artifacts | |
├── /conf/ # Configurations files and other non-compiled resources (on classpath) | |
│ ├── application.conf # Play application configuratiion file. | |
│ ├── logback.xml # Logging configuration | |
│ └── routes # Routes definition file | |
├── /logs/ # Log directory | |
│ └── application.log # Application log file | |
├── /project/ # Contains project build configuration and plugins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Routes | |
# This file defines all application routes (Higher priority routes first) | |
# ~~~~ | |
# Serve index page from public directory | |
GET / controllers.FrontendController.index() | |
# An example route (Prefix all API routes with apiPrefix defined in application.conf) | |
GET /api/summary controllers.HomeController.appSummary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.sys.process.Process | |
/* | |
* UI Build hook Scripts | |
*/ | |
// Execution status success. | |
val Success = 0 | |
// Execution status failure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.sbt.PlayRunHook | |
import sbt._ | |
import scala.sys.process.Process | |
/** | |
* Frontend build play run hook. | |
* https://www.playframework.com/documentation/2.7.x/SBTCookbook | |
*/ | |
object FrontendRunHook { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Frontend build commands. | |
* Change these if you are using some other package manager. i.e: Yarn | |
*/ | |
object FrontendCommands { | |
val dependencyInstall: String = "npm install" | |
val test: String = "npm run test" | |
val serve: String = "npm run start" | |
val build: String = "npm run build" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
... | |
"build": "rimraf ../public && react-scripts build && ncp build ../public && rimraf build", | |
... | |
}, | |
... | |
"proxy": "http://localhost:9000", | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Frontend build commands. | |
* Change these if you are using some other package manager. i.e: Yarn | |
*/ | |
object FrontendCommands { | |
val dependencyInstall: String = "npm install" | |
val test: String = "npm run test:ci" | |
val serve: String = "npm run start" | |
val build: String = "npm run build:prod" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.sbt.PlayRunHook | |
import sbt._ | |
import scala.sys.process.Process | |
/** | |
* Frontend build play run hook. | |
* https://www.playframework.com/documentation/2.7.x/SBTCookbook | |
*/ | |
object FrontendRunHook { |
NewerOlder