Skip to content

Commit

Permalink
chore: enhance development experience (#79)
Browse files Browse the repository at this point in the history
* chore: enhance development experience
  • Loading branch information
bs32g1038 authored and zhangyuang committed Sep 6, 2019
1 parent 061f6b2 commit 9187440
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/guide/ssr-csr.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ const dev = () => {
res.write(string)
res.end()
})
},
after(app) {
app.get(/^\//, async (req, res) => {
res.write(string)
res.end()
})
}
})
server.listen(8000, 'localhost')
Expand Down
6 changes: 6 additions & 0 deletions packages/yk-cli/src/clientRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const dev = () => {
res.write(str)
res.end()
})
},
after (app: any) {
app.get(/^\//, async (req: any, res: Res) => {
res.write(str)
res.end()
})
}
})
server.listen(8000, 'localhost', () => {
Expand Down

0 comments on commit 9187440

Please sign in to comment.