Skip to content

Commit

Permalink
Experimental site2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahnfelt committed Jan 7, 2025
1 parent 92c4e03 commit 61d8669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions experimental/site2/ChatRoomRoute.ff
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import WebServer from ff:webserver
import Router
import Route

moduleName = SourceLocation.here().module()
routeModule = SourceLocation.here().module()

data Chat(room: String)

handle(request: WebRequest[WebResponse], context: RouteContext, roomId: Int) {
let pageData = Chat("42")
let title = "Chat"
Route.renderAndServe(context.system, moduleName, pageData, title, request, {render(_, pageData)})
Route.renderAndServe(context.system, routeModule, pageData, title, request, {render(_, pageData)})
}

browserMain(system: BrowserSystem) {
Expand Down
2 changes: 1 addition & 1 deletion experimental/site2/Router.ff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chatRoomUserRoute: Route2[Int, Int] =
Route.new2("/chat/{roomId}/users/{userId}")

modulesWithBrowserMain: List[String] = [
ChatRoomRoute.moduleName
ChatRoomRoute.routeModule
]

handlers(handler: RouteHandler[RouteContext]) {
Expand Down

0 comments on commit 61d8669

Please sign in to comment.