From 54dbc5a427e138c1e4d5f38b6461a01c9a5c5f8d Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 27 Mar 2023 17:58:17 +0200 Subject: [PATCH] fixed routing --- ModuleConfig.cfc | 3 +++ server-lucee@5.json | 10 +++++----- test-harness/handlers/Main.cfc | 4 ++-- test-harness/main/index.cfm | 3 --- test-harness/views/main/index.cfm | 3 +++ 5 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 test-harness/main/index.cfm create mode 100644 test-harness/views/main/index.cfm diff --git a/ModuleConfig.cfc b/ModuleConfig.cfc index 0d9d54f..9e16b13 100644 --- a/ModuleConfig.cfc +++ b/ModuleConfig.cfc @@ -30,6 +30,9 @@ component { // module settings - stored in modules.name.settings settings = {}; + // Home Route + router.route( "/" ).to( "Home.index" ); + // Layout Settings layoutSettings = { defaultLayout : "Main.cfm" }; } diff --git a/server-lucee@5.json b/server-lucee@5.json index 02bd8d1..8cc033e 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -11,13 +11,13 @@ "rewrites":{ "enable":"true" }, - "webroot": "test-harness", - "aliases":{ + "webroot":"test-harness", + "aliases":{ "/moduleroot/route-visualizer":"../" } }, "openBrowser":"false", - "cfconfig": { - "file" : ".cfconfig.json" - } + "cfconfig":{ + "file":".cfconfig.json" + } } diff --git a/test-harness/handlers/Main.cfc b/test-harness/handlers/Main.cfc index 4d8e3f0..cb8ccba 100644 --- a/test-harness/handlers/Main.cfc +++ b/test-harness/handlers/Main.cfc @@ -2,7 +2,7 @@ function index( event, rc, prc ){ - return "

Go to the Route Visualizer Here!

"; + event.setView( "main/index" ); } -} \ No newline at end of file +} diff --git a/test-harness/main/index.cfm b/test-harness/main/index.cfm deleted file mode 100644 index 992cabe..0000000 --- a/test-harness/main/index.cfm +++ /dev/null @@ -1,3 +0,0 @@ - -Module Tester - \ No newline at end of file diff --git a/test-harness/views/main/index.cfm b/test-harness/views/main/index.cfm new file mode 100644 index 0000000..f6d52a4 --- /dev/null +++ b/test-harness/views/main/index.cfm @@ -0,0 +1,3 @@ + +

Go to the Route Visualizer Here!

+