npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vercube/nitro

v1.2.1

Published

Nitro module for Vercube framework

Readme

@vercube/nitro

Nitro integration for the Vercube framework. This package wires up Vercube's decorator-based controllers, services and middleware into a Nitro server module, so you can use the full Vercube DI/decorator system without any extra glue code.

Installation

pnpm add @vercube/nitro

Usage

Add the plugin to your nitro.config.ts:

import { vercubeNitro } from '@vercube/nitro';

export default defineNitroConfig({
  modules: [
    vercubeNitro({
      // optional path to a boot file that runs before the app starts
      setupFile: './src/boot/boot.ts',
    }),
  ],
});

Boot file

The setupFile is a regular TypeScript module that exports a default function. It receives the Vercube App instance and is the right place to configure your DI container, register providers, or run any startup logic.

// src/boot/boot.ts
import type { App } from '@vercube/core';

export default async function boot(app: App) {
  // configure the app here
}

Controllers

Annotate your classes with @Controller and HTTP method decorators. The plugin discovers them automatically at build time.

import { Controller, Get, Post } from '@vercube/core';

@Controller('/users')
export class UserController {
  @Get('/')
  list() {
    return [{ id: 1, name: 'Alice' }];
  }

  @Post('/')
  create() {
    return { id: 2, name: 'Bob' };
  }
}

Place your controllers in the api/ or routes/ directory (configurable via nitro.config.ts options apiDir / routesDir).

Services

Services decorated with @Injectable are discovered and registered in the DI container automatically. Place them anywhere inside the directories listed in scanDirs.

import { Injectable } from '@vercube/di';

@Injectable()
export class UserService {
  findAll() {
    return [];
  }
}

Middleware

Classes that extend BaseMiddleware are picked up and registered automatically.

import { BaseMiddleware } from '@vercube/core';

export class AuthMiddleware extends BaseMiddleware {
  async onRequest(event: any) {
    // validate token, etc.
  }
}

Storage

@vercube/nitro ships a NitroStorageManager that wraps Nitro's built-in storage layer. Configure your storage drivers in nitro.config.ts under storage, then inject StorageManager in your services as usual.

// nitro.config.ts
export default defineNitroConfig({
  storage: {
    cache: { driver: 'memory' },
  },
});

Options

| Option | Type | Default | Description | | ----------- | ---------- | ------- | ----------------------------------------------------- | | setupFile | string | - | Path to the boot file executed before the app starts | | scanDirs | string[] | [] | Extra directories to scan for services and middleware |

License

MIT