diff options
author | 2023-08-13 10:03:41 +0700 | |
---|---|---|
committer | 2023-08-12 20:03:41 -0700 | |
commit | 1e96cbfb020fcc29b04a5162f419d76868c514cb (patch) | |
tree | ac18e9218347a6f50cf92c1d60a38652a2580ecf /docs | |
parent | 78defe7a87226b5b10766e24fae458a62811dab2 (diff) | |
download | bun-1e96cbfb020fcc29b04a5162f419d76868c514cb.tar.gz bun-1e96cbfb020fcc29b04a5162f419d76868c514cb.tar.zst bun-1e96cbfb020fcc29b04a5162f419d76868c514cb.zip |
Update Stric guides (#4137)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/guides/ecosystem/stric.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/guides/ecosystem/stric.md b/docs/guides/ecosystem/stric.md index 15ef72cc6..2d12bb0ba 100644 --- a/docs/guides/ecosystem/stric.md +++ b/docs/guides/ecosystem/stric.md @@ -16,7 +16,7 @@ Use `bun init` to create an empty project. $ mkdir myapp $ cd myapp $ bun init -$ bun add @stricjs/router +$ bun add @stricjs/router @stricjs/utils ``` --- @@ -32,12 +32,14 @@ export default new Router() --- -To serve static files from `/public/*`: +To serve static files from `/public`: ```ts#index.ts +import { dir } from '@stricjs/utils'; + export default new Router() .get('/', () => new Response('Hi')) - .get('/public/*', stream('.')); + .get('/*', dir('./public')); ``` --- @@ -50,4 +52,4 @@ $ bun --watch run index.ts --- -For more info, see Stric's [documentation](https://stricjs.gitbook.io/docs). +For more info, see Stric's [documentation](https://stricjs.netlify.app). |