From 1e96cbfb020fcc29b04a5162f419d76868c514cb Mon Sep 17 00:00:00 2001 From: Revenity Date: Sun, 13 Aug 2023 10:03:41 +0700 Subject: Update Stric guides (#4137) --- docs/guides/ecosystem/stric.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs') 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). -- cgit v1.2.3