(KOA2 step3)简单用html增加页面
发布日期:2021-05-15 00:16:16 浏览次数:12 分类:精选文章

本文共 1440 字,大约阅读时间需要 4 分钟。

������������������������������������������������������������������������������������������������������������������������������������������static���������������������������������������������������������������������������������������������������������

���������������static������������������������������������1.html���������������������������������������������������������������HTML������������������������������������������������������������������������������������������������

���������������������������������������������������������1.html������������������������������������������������index.js������������������Express���������������������������������������������������������������router.get('/user', async (ctx, next) => { ... })������������������������������/user������������������������������������������������������������������������������������������ctx.type = 'html';���������������fs.createReadStream('./static/1.html')���������������������������������������������������������try-catch���������������������������������������������������������

���������������������������������������������������������URL���/user������������������������������������������������������������������������������static���������������������������������������������1.html���������������������������������������������������������������������������������������������������������������Express������������������������������������������������������������������

上一篇:(KOA2 step4)简单的表单提交
下一篇:(KOA2 step2)使用ejs来增加页面

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2025年05月03日 08时53分58秒