Intro
Welcome to Stric documentation
Stric is a Bun-first framework for building high-performance, scalable web applications.
Features
Perfomance: Internally use
Radx
, an improved version of@medley/router
with optimizations only for Bun. Stric also composes your final fetch handler to reduce unused code.Scalability: Stric ensures high performance even under heavy workloads.
Minimal: The basic components like
@stricjs/router
and@stricjs/utils
is under 50kB and use no external dependencies.Customizable: Stric comes with a plugin system, dependencies injection and more optional optimizations for handling requests.
Performance
Stric is one of the fastest JS web frameworks. See the full benchmark here.
Quick Start
You need to have Bun installed to run Stric.
For Windows users, you can use WSL or WSL2 to install Bun.
# Linux, MacOS and WSL
curl -fsSL https://bun.sh/install | bash
# NPM
npm install -g bun
# Homebrew
brew tap oven-sh/bun
brew install bun
# Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun
# Proto
proto install bun
Create a new project and install the router component.
# Create an empty Bun project
bun init
# Install @stricjs/router
bun add @stricjs/router
Let's write a simple hello world server.
import { Router } from '@stricjs/router';
export default new Router()
.get('/', () => new Response('Hello world!'));
Start the server using bun index.ts
, open your browser and go to localhost:3000.
You should see the server responds with Hi
.
Just like that, you have created your first app with Stric 🎉.
Last updated
Was this helpful?