# Intro

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](https://github.com/bunsvr/benchmark/blob/main/results/index.md).

{% embed url="<https://gist.github.com/aquapi/ec3bcae3c0f6ca84309c908d0f51fcc7>" %}
A benchmark of Bun, Node and Deno frameworks
{% endembed %}

### Quick Start

You need to have Bun installed to run Stric.

For Windows users, you can use WSL or WSL2 to install Bun.

```bash
# 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.

```bash
# Create an empty Bun project
bun init

# Install @stricjs/router
bun add @stricjs/router
```

Let's write a simple hello world server.

{% code title="index.ts" overflow="wrap" fullWidth="false" %}

```typescript
import { Router } from '@stricjs/router';

export default new Router()
    .get('/', () => new Response('Hello world!')); 
```

{% endcode %}

Start the server using `bun index.ts`, open your browser and go to [localhost:3000](http://localhost:3000).\
You should see the server responds with `Hi`.

Just like that, you have created your first app with Stric :tada:.
