v9.2.0 · Node.js 26 · TypeScript 6

A framework that gets out of your way.

Dependency injection, modules, routing and a request lifecycle built on decorators. Ship a REST API, a GraphQL endpoint or a Lambda handler from one module graph, without glue code.

bash
npm i -g @typeix/clitypeix new project-namecd project-nametypeix start --watch
@Controller({path: "/users"})
export class UsersController {
  @Inject() private users: UserService;

  @GET("/<id>")
  findById(@PathParam("id") id: string) {
    return this.users.find(id);
  }
}
@RootModule({
  shared_providers: [],
  imports: [UsersModule],
  controllers: [UsersController]
})
export class ApplicationModule {}
@Resolver(() => User)
export class UsersResolver {
  @Inject() private users: UserService;

  @Query(() => [User])
  list(): Promise<User[]> {
    return this.users.list();
  }
}
import {createServer} from "http";
import {pipeServer} from "@typeix/resty";

async function bootstrap() {
  const server = createServer();
  await pipeServer(server, ApplicationModule);
  server.listen(3000);
}

bootstrap();
15
packages, one dependency graph
3
protocols: http, https, http2
0
runtime deps in @typeix/utils
9.2.0
current release

Lifecycle

Three steps from empty folder to routed API.

  1. 01

    Declare the graph

    Root and feature module decorators describe which controllers and providers belong together.

  2. 02

    pipeServer builds it

    One async call resolves the injector, attaches the router and registers every route.

  3. 03

    Attach what you need

    pipeSwagger, pipeGraphQL and pipeWebSocket reuse the same graph on the same server.

Live preview

Run it in the browser

A complete resty application on StackBlitz. Edit the controller and watch the route change.

Open in StackBlitz

Ready when you are.

Fourteen packages, one mental model. Start with a single controller.