skills/bun-guides-ecosystem-stric/SKILL.md
Build an HTTP server using StricJS and Bun
npx skillsauth add jarle/bun-skills Bun Build an HTTP server using StricJS and BunInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
StricJS is a Bun framework for building high-performance web applications and APIs.
@stricjs/router and @stricjs/utils are under 50kB and require no external dependencies.Use bun init to create an empty project.
mkdir myapp
cd myapp
bun init
bun add @stricjs/router @stricjs/utils
To implement a simple HTTP server with StricJS:
import { Router } from "@stricjs/router";
export default new Router().get("/", () => new Response("Hi"));
To serve static files from /public:
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.
bun --watch run index.ts
For more info, see Stric's documentation.
development
Using TypeScript with Bun, including type definitions and compiler options
development
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
testing
Learn how to use snapshot testing in Bun to save and compare output between test runs
testing
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling