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 🙏

© 2025 – Pkg Stats / Ryan Hefner

aetherx

v1.0.2

Published

UltraFast Server – Lightweight Bun-powered HTTP framework with routes, ?middleware, plugins, request/response management, and modern logging

Readme

📂 AETHERX

UltraFast Server – Lightweight Bun-powered HTTP framework with routes, middleware, plugins, request/response management, and modern logging

npm version npm downloads Discord


📦 Installation

npm install aetherx
# or
yarn add aetherx
# or
bun add aetherx

Note: Bun must be installed globally:

npm install -g bun

🚀 Running HTTP Server

import { Sether } from "aetherx";

const server = new Sether({
  port: 3000,
  settings: {
    logger: true,
    development: false,
    error: new Response(`<pre>500 Internal Server Error</pre>`, {
      status: 500,
      headers: { "Content-Type": "text/html" },
    }),
  },
});

🛣️ Adding Routes

app.get("/", (req, res) => res.status(200).text("Welcome!"));
app.get("/html", (req, res) => res.render("./src/pages/index.html"));
app.get("/ejs", (req, res) => 
  res.render("./src/pages/index.ejs", { title: "EJS Page" }) // requires npm i ejs
);

📌 Aether Router

import { Sether, Router } from "aetherx";

const router = new Router();

router.create({
  routeName: "myUserRoute",
  name: "/user",
  category: "/api",
  method: "get",
  run: (req, res) => res.render("./src/pages/index.html"),
});

router.create({
  routeName: "userProfile",
  name: "/user/profile",
  category: "/api",
  method: "get",
  run: (req, res) => res.render("./src/pages/profile.html"),
});

const server = new Sether({
  port: 3000,
  routes: ["myUserRoute", "userProfile"], // routeName references
  settings: {
    logger: true,
    development: false,
    error: new Response(`<pre>500 Internal Server Error</pre>`, {
      status: 500,
      headers: { "Content-Type": "text/html" },
    }),
  },
});

🔌 Plugins

Available plugins: AI, CORS, Helmet, RateLimit

import { Sether, AiPlugin, chat, CorsPlugin, HelmetPlugin, RateLimitPlugin } from "aetherx";

const server = new Sether({
  port: 3000,
  plugins: [
    new AiPlugin({
      apiKey: "YOUR_OPENAI_KEY",
      model: "gpt-4",
      chat: async (messages) => await chat("gemini", messages)
    }),
    new HelmetPlugin({
      contentSecurityPolicy: true,
      referrerPolicy: "no-referrer",
      xssProtection: true
    }),
    new CorsPlugin({
      origin: "*",
      methods: ["GET", "POST"],
      credentials: true
    }),
    new RateLimitPlugin({
      windowMs: 60000,
      max: 100,
      identifier: (req) => req.ip || "anon"
    }),
  ],
  settings: {
    logger: true,
    development: false,
  },
});

// Using AI chat
const reply = await chat("gemini", [
  { role: "user", content: "Hello Gemini!" }
]);
console.log(reply); // Gemini's response

🗓️ Events

server.on("ready", () => console.log("Server started!"));

server.emit("yourCustomEvent", "args");

server.on("yourCustomEvent", (...args) => console.log("Event triggered:", args));

⚡ API

Sether (Server)

| Method | Description | | ------------------------------ | -------------------------------- | | on(event: string, callback) | Listen for server events | | emit(event: string, ...args) | Emit custom events | | routes | Array of route names to register | | plugins | Array of plugins to use |

Router

| Method | Description | | ------------------------- | ------------------------------- | | create(params) | Create a new route | | getRouter() | Return all routes | | findRoute(name, method) | Find a route by name and method |

ReqManager

| Method | Description | | ------------------------ | -------------------------- | | json() | Parse request body as JSON | | text() | Get raw text body | | form() | Parse as FormData | | getHeader(name) | Get specific header | | getQuery(key, default) | Get query param | | getParam(key) | Get route param | | device() | Detect device/browser info | | ip | Get client IP |

ResponseBuilder

| Method | Description | | -------------------- | ------------------------ | | status(code) | Set response status | | json(data) | Send JSON response | | text(data) | Send plain text response | | render(path, data) | Render HTML/EJS template |