Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOA2 使用 想渲染html 时怎么弄? #39

Closed
18978909244 opened this issue Aug 15, 2019 · 1 comment
Closed

KOA2 使用 想渲染html 时怎么弄? #39

18978909244 opened this issue Aug 15, 2019 · 1 comment

Comments

@18978909244
Copy link

静态文件使用没问题,但是用模版引擎渲染一些html而不是json接口时,依然会走restc的服务,这个时候怎么强制输出html?

@lujjjh
Copy link
Contributor

lujjjh commented Aug 15, 2019

如果 API 有固定前缀,可以针对某个前缀 use restc。

规则复杂的情况下可以用 includes / excludes / shouldHandle,请参考 #26

@lujjjh lujjjh closed this as completed Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants