Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 2.41 KB

detailed.md

File metadata and controls

24 lines (16 loc) · 2.41 KB

How to write view?

Take home and about as reference:

  1. a View described literal shall be returned as home/index.ts
  2. multiple Routes can be registered. Usually Routes are distinguished by METHOD
  3. controller can be async if you preferred that syntax, see home/controller

How to write api?

Take user as reference:

  1. an Api described literal shall be returned as user/index.ts
  2. multiple Routes can be registered. Usually Routes are distinguished by METHOD
  3. controller can be async or not. check user/controller for non-async example

How to add front-end script/css?

Take home as reference:

  1. create folder with a name same as pageId under static.
  2. create main.ts
  3. import main.css within main.ts
  4. add this main.ts into webpack.client.js