rembrembdocs

Skip to main content

Bun home pagelight logodark logo

[Runtime

](../../../index.md)[Package Manager

](../../../pm/cli/install/index.md)[Bundler

](../../../bundler/index.md)[Test Runner

](../../../test/index.md)[Guides

](../../index.md)[Reference

](https://bun.com/reference)[Blog

](https://bun.com/blog)[Feedback

](../../../feedback/index.md)

StricJS is a Bun framework for building high-performance web applications and APIs.


Use bun init to create an empty project.

terminal

mkdir myapp
cd myapp
bun init
bun add @stricjs/router @stricjs/utils

To implement an HTTP server with StricJS:

index.ts

import { Router } from "@stricjs/router";

export default new Router().get("/", () => new Response("Hi"));

To serve static files from /public:

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.

terminal

bun --watch run index.ts

For more info, see Stric’s documentation.

Was this page helpful?

Suggest editsRaise issue

[

Server-side render (SSR) a React component

Previous

](../ssr-react/index.md)[

Build an app with SvelteKit and Bun

Next

](../sveltekit/index.md)