Add HomeController and initial application setup with routing
This commit is contained in:
1
knockoutwhistweb/conf/application.conf
Normal file
1
knockoutwhistweb/conf/application.conf
Normal file
@@ -0,0 +1 @@
|
||||
# https://www.playframework.com/documentation/latest/Configuration
|
||||
50
knockoutwhistweb/conf/logback.xml
Normal file
50
knockoutwhistweb/conf/logback.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!-- https://www.playframework.com/documentation/latest/SettingsLogger -->
|
||||
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.classic.AsyncAppender"/>
|
||||
<import class="ch.qos.logback.core.FileAppender"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="FILE" class="FileAppender">
|
||||
<file>${application.home:-.}/logs/application.log</file>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %cyan(%logger{36}) %magenta(%X{pekkoSource}) %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<!--
|
||||
On Windows, enabling Jansi is recommended to benefit from color code interpretation on DOS command prompts,
|
||||
which otherwise risk being sent ANSI escape sequences that they cannot interpret.
|
||||
See https://logback.qos.ch/manual/layouts.html#coloring
|
||||
-->
|
||||
<!-- <withJansi>true</withJansi> -->
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %cyan(%logger{36}) %magenta(%X{pekkoSource}) %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="ASYNCFILE" class="AsyncAppender">
|
||||
<appender-ref ref="FILE"/>
|
||||
</appender>
|
||||
|
||||
<appender name="ASYNCSTDOUT" class="AsyncAppender">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</appender>
|
||||
|
||||
<logger name="play" level="INFO"/>
|
||||
<logger name="application" level="DEBUG"/>
|
||||
|
||||
<root level="WARN">
|
||||
<appender-ref ref="ASYNCFILE"/>
|
||||
<appender-ref ref="ASYNCSTDOUT"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
1
knockoutwhistweb/conf/messages
Normal file
1
knockoutwhistweb/conf/messages
Normal file
@@ -0,0 +1 @@
|
||||
# https://www.playframework.com/documentation/latest/ScalaI18N
|
||||
10
knockoutwhistweb/conf/routes
Normal file
10
knockoutwhistweb/conf/routes
Normal file
@@ -0,0 +1,10 @@
|
||||
# Routes
|
||||
# This file defines all application routes (Higher priority routes first)
|
||||
# https://www.playframework.com/documentation/latest/ScalaRouting
|
||||
# ~~~~
|
||||
|
||||
# An example controller showing a sample home page
|
||||
GET / controllers.HomeController.index()
|
||||
|
||||
# Map static resources from the /public folder to the /assets URL path
|
||||
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
|
||||
Reference in New Issue
Block a user