Skip to content

Commit

Permalink
Tweak first controller example a bit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alper authored Jul 26, 2023
1 parent 3181a16 commit 22cd123
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/getting-started/create-your-first-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down

0 comments on commit 22cd123

Please sign in to comment.