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

nast.ge

v1.0.4

Published

nast.ge, dp library like nest.js

Readme

NastJS

NastJS is a lightweight framework inspired by NestJS, designed to simplify building scalable and modular Node.js applications.

By default, the application runs on http://localhost:3000.

Creating Modules, Controllers, and Services

To create a new module, controller, and service using NastJS, follow these steps:

  1. Create a new TypeScript file for your module:
// mymodule.module.ts
import { Module } from "../nast/decorators/module.decorator";
import { MyController } from "./mycontroller.controller";
import { MyService } from "./myservice.service";

@Module({
  provider: [MyService],
  controller: [MyController],
  exports: [],
  imports: [],
})
export class MyModule {}
  1. Create a new TypeScript file for your controller:
// mycontroller.controller.ts
import { Controller } from "../nast/decorators/controller.decorator";
import { Get, Post } from "../nast/decorators/http.decorator";
import { MyService } from "./myservice.service";
import { NastRequest } from "../nast/types/types";

@Controller()
export class MyController {
  constructor(private readonly myService: MyService) {}

  @Get("/myroute")
  handleGetRequest(req: NastRequest) {
    // Handle GET request
  }

  @Post("/myroute")
  handlePostRequest(req: NastRequest) {
    // Handle POST request
  }
}
  1. Create a new TypeScript file for your service:
// myservice.service.ts
import { Injectable } from "../nast/decorators/injectable.decorator";

@Injectable("myService")
export class MyService {
  // Service methods and business logic here
}

Dependency Injection

NastJS provides a simple dependency injection system. To use it, follow these steps:

  1. Decorate your service with the @Injectable decorator:
import { Injectable } from "../nast/decorators/injectable.decorator";

In Injectable decorator, you have to put argument a key of service, than u should
use this key in a controller or anywhere u have to use it.

@Injectable("myService")
export class MyService {
  // ...
}
  1. Inject the service into your controller or other services:
import { Controller } from "../nast/decorators/controller.decorator";
import { MyService } from "./myservice.service";

@Controller()
export class MyController {
  constructor(private readonly myService: MyService) {
    // ...
  }

  // ...
}

Routing

NastJS provides decorators to define routes within your controllers. Here's an example:

import { Controller } from "../nast/decorators/controller.decorator";
import { Get, Post } from "../nast/decorators/http.decorator";
import { MyService } from "./myservice.service";
import { NastRequest } from "../nast/types/types";

@Controller("/users")
export class UserController {
  constructor(private readonly userService: UserService) {}

  @Get("/getUser")
  getUser(req: NastRequest) {
    // Handle GET request for user retrieval
  }

  @Post("/createUser")
  createUser(req: NastRequest) {
    // Handle POST request for user creation
  }
}

The @Controller decorator sets the base path for all routes defined within the controller.

Contributing

Contributions to NastJS are welcome! If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push them to your fork.
  4. Submit a pull request with a clear description of your changes.

License

ISC


Please note that the above README assumes that you have cloned the NastJS repository and have access to the source files in the provided structure. Adjust the instructions as necessary based on your project's setup.