From 22cd1232aca525207db4861014fcff250dc1c627 Mon Sep 17 00:00:00 2001 From: Alper Cugun Date: Wed, 26 Jul 2023 12:22:53 +0200 Subject: [PATCH] Tweak first controller example a bit The guide as it is would not work for me. I have a /pages/ and a /rest/ folder in controllers. Dropping the CalendarCtrl in the root folder does not do anything by itself. --- docs/getting-started/create-your-first-controller.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/create-your-first-controller.md b/docs/getting-started/create-your-first-controller.md index a9f221fc880..37bb887050e 100644 --- a/docs/getting-started/create-your-first-controller.md +++ b/docs/getting-started/create-your-first-controller.md @@ -32,7 +32,13 @@ See [Controllers](/docs/controllers.md) section for more details You have to configure [engine rendering](/tutorials/templating) if you want to use the decorator @@Render@@. ::: -To test your method, just run your `server.ts` and send an HTTP request on `/rest/calendars/1`. +The `CalendarCtrl` you just added needs to be connected by exporting it. Find a `index.ts` in my case in the `/rest/` folder and add the following line: + +``` +export * from "./CalendarCtrl"; +``` + +To test your method, just run your `server.ts` and send an HTTP request on `/rest/calendars/`. ### Ready for More?