DEV Community

Revenity
Revenity

Posted on

Stric: A web framework

Intro

Stric is a Bun-first framework for building high-performance, scalable web applications in JS.

import { Router, macro } from '@stricjs/router';

export default new Router()
    .get('/', macro('Hello world!'));
Enter fullscreen mode Exit fullscreen mode

How can JS be fast?

  • Bun is a new JavaScript runtime aimed to be a drop-in replacement for Node.js.
  • The Bun server API which Stric uses can handle 2.75x more requests than Node http. In fact it can even outperform Actix for a simple web app.

Features

  • Performance: Stric is one of the fastest web frameworks in the Bun ecosystem. See the benchmark here.
  • 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.
  • Explicit: Only do things like parsing when required.
  • Extensible: Stric comes with a plugin system, dependencies injection and more optional optimizations for handling requests.

Docs

For more info, see the Stric documentation here.

Top comments (0)