--- name: Build an HTTP server using StricJS and Bun --- [StricJS](https://github.com/bunsvr) is a Bun framework for building high-performance web applications and APIs. - **Fast** — Stric is one of the fastest Bun frameworks. See [benchmark](https://github.com/bunsvr/benchmark) for more details. - **Minimal** — The basic components like `@stricjs/router` and `@stricjs/utils` are under 50kB and require no external dependencies. - **Extensible** — Stric includes with a plugin system, dependency injection, and optional optimizations for handling requests. --- Use `bun init` to create an empty project. ```bash $ mkdir myapp $ cd myapp $ bun init $ bun add @stricjs/router @stricjs/utils ``` --- To implement a simple HTTP server with StricJS: ```ts#index.ts import { Router } from '@stricjs/router'; export default new Router() .get('/', () => new Response('Hi')); ``` --- To serve static files from `/public`: ```ts#index.ts import { dir } from '@stricjs/utils'; export default new Router() .get('/', () => new Response('Hi')) .get('/*', dir('./public')); ``` --- Run the file in watch mode to start the development server. ```bash $ bun --watch run index.ts ``` --- For more info, see Stric's [documentation](https://stricjs.netlify.app). ld-process-fixes'>ciro/child-process-fixes Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/void-shouldnt-delete-call-expressions.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2021-11-24deps: add missing mimalloc dep to jsc bindings header generatorGravatar Kenta Iwasaki 2-2/+3
2021-11-24deps: build picohttp and mimalloc using zigGravatar Kenta Iwasaki 2-131/+123
2021-11-23update Next version on globalGravatar Jack Hanford 1-1/+1
2021-11-23Update build-idGravatar Jarred Sumner 1-1/+1
2021-11-23fix shallow routingGravatar Jack Hanford 1-4/+6
2021-11-23remove commentGravatar Jack Hanford 1-1/+0
2021-11-23add react-dom as devDepGravatar Jack Hanford 1-0/+1
2021-11-23stop installing textencoderGravatar Jack Hanford 3-2/+308
2021-11-23begin addressing more feedbackGravatar Jack Hanford 1-3/+3
2021-11-22remove .thenGravatar Jack Hanford 1-12/+3
2021-11-22another tryGravatar Jack Hanford 2-5/+1
2021-11-22add type fnsGravatar Jack Hanford 1-1/+4