aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGravatar Revenity <aquaplmc@gmail.com> 2023-06-28 02:37:57 +0700
committerGravatar GitHub <noreply@github.com> 2023-06-27 12:37:57 -0700
commit7ba4ae11c966e72757a479d594f333fbe6162d0e (patch)
tree3d98b4096903c8c2cc4759ee4de2071a41af5918 /docs
parent5376b5b5d6054b487cd2a3fae1a725b48d5c079a (diff)
downloadbun-7ba4ae11c966e72757a479d594f333fbe6162d0e.tar.gz
bun-7ba4ae11c966e72757a479d594f333fbe6162d0e.tar.zst
bun-7ba4ae11c966e72757a479d594f333fbe6162d0e.zip
Update Stric page in Ecosystem (#3399)
Diffstat (limited to 'docs')
-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();