aboutsummaryrefslogtreecommitdiff
path: root/docs/ecosystem/stric.md
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-07-11 19:14:34 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-11 19:14:34 -0700
commitcbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch)
tree43a00501f3cde495967e116f0b660777051551f8 /docs/ecosystem/stric.md
parent1f900cff453700b19bca2acadfe26da4468c1282 (diff)
parent34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff)
downloadbun-jarred/esm-conditions.tar.gz
bun-jarred/esm-conditions.tar.zst
bun-jarred/esm-conditions.zip
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to 'docs/ecosystem/stric.md')
-rw-r--r--docs/ecosystem/stric.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/ecosystem/stric.md b/docs/ecosystem/stric.md
index b6b93725c..5f2787d75 100644
--- a/docs/ecosystem/stric.md
+++ b/docs/ecosystem/stric.md
@@ -1,20 +1,20 @@
[Stric](https://github.com/bunsvr) is a minimalist, fast web framework for Bun.
```ts#index.ts
-import { App } from "@stricjs/core";
+import { Router } from '@stricjs/router';
// Export the fetch handler and serve with Bun
-export default new App()
- // Return "Hi!" on every request
- .use(() => new Response("Hi!"));
+export default new Router()
+ // Return 'Hi' on every request
+ .get('/', () => new Response('Hi'));
```
-Stric provides support for [ArrowJS](https://www.arrow-js.com), a library for building reactive interfaces in **native** JavaScript.
+Stric provides support for [ArrowJS](https://www.arrow-js.com), a library for building reactive interfaces.
{% codetabs %}
```ts#src/App.ts
-import { html } from "@stricjs/arrow/utils";
+import { html } from '@stricjs/arrow/utils';
// Code inside this function can use web APIs
export function render() {
@@ -23,10 +23,10 @@ export function render() {
};
// Set the path to handle
-export const path = "/";
+export const path = '/';
```
```ts#index.ts
-import { PageRouter } from "@stricjs/arrow";
+import { PageRouter } from '@stricjs/arrow';
// Create a page router, build and serve directly
new PageRouter().serve();