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

newgatejs

v1.2.4

Published

modern Node.js backend framework designed for developers who want to handle multiple data formats effortlessly. It combines the simplicity of Express-style routing with automatic parsing for JSON, CSV, XML, YAML, form-data, and binary data.

Readme

A modern, lightweight, and multi-format backend framework for Node.js.

npm version Build Status npm version npm downloads npm total downloads License

Overview

Newgate is a modern Node.js backend framework designed for developers who want to handle multiple data formats effortlessly. It combines the simplicity of Express-style routing with automatic parsing for JSON, CSV, XML, YAML, form-data, and binary data.

Whether you're building a REST API, a data processing service, or an IoT backend, Newgate has you covered.

Features

  • Express-style Routing: Familiar API for defining routes and middleware.
  • Multi-format Parsing: Automatic parsing for JSON, CSV, XML, YAML, Form-Data, and Binary.
  • Middleware System: Robust middleware support for logging, authentication, and more.
  • Lightweight: Zero external dependencies for core routing and middleware.
  • Security: Built-in security features like XXE protection and file upload limits.
  • Enhanced Responses: Helper methods for sending responses in various formats (res.json, res.csv, res.xml, etc.).
  • Auto-Documentation: Automatically generate API documentation from your routes.

Installation

npm install newgatejs

Quick Start

Create a simple server in index.js:

import App from 'newgatejs';

const app = new App();

// Middleware
app.use((req, res, next) => {
  console.log(`${req.method} ${req.url}`);
  next();
});


// XML route
app.post("/xml", (req, res) => {
  res.json({ received: req.body, type: req.bodyType });
});

// Binary route
app.post("/binary", (req, res) => {
  res.send(`Binary data received: ${req.body.length} bytes`);
});

// Start server
app.listen(3000, () => console.log("newgatejs running on http://localhost:3000"));

Example Requests

JSON

curl -X POST http://localhost:3000/json \
-H "Content-Type: application/json" \
-d '{"name":"arpit","age":20}'

CSV

curl -X POST http://localhost:3000/csv \
-H "Content-Type: text/csv" \
--data "name,age\narpit,20\nadarsh,19"

XML

curl -X POST http://localhost:3000/xml \
-H "Content-Type: application/xml" \
--data "<users><user><name>arpit</name><age>20</age></user></users>"

Binary

curl -X POST http://localhost:3000/binary \
-H "Content-Type: application/octet-stream" \
--data-binary "@largefile.bin"

Documentation


How It Works

  1. The HTTP server receives the request.
  2. The auto-detect parser identifies the content type and parses the body into req.body.
  3. Middleware functions are executed in order.
  4. The appropriate route handler is called with extracted parameters.
  5. Response helpers send data back to the client in the desired format.

Roadmap

v1.0 – Core Framework

  • JSON, CSV, XML, YAML, Form-data, Binary parsing
  • Express-style routing
  • Middleware support
  • Basic response helpers

v1.5 – Developer Experience

  • CLI for scaffolding projects
  • Hot reload for routes
  • Auto-generated API documentation

v2.0 – Advanced Features

  • AI-assisted validation and error suggestions
  • Edge/serverless deployment support
  • Multi-protocol support (HTTP, WebSocket, gRPC)
  • Plugin system for third-party parsers
  • Predictive caching and monitoring

v3.0+ – Next-gen Backend

  • Reactive routes (Observable streams)
  • Real-time request/response dashboard
  • Versioned APIs and time-travel debugging
  • Auto translation between data formats

Contributing

Contributions are welcome. Fork the repository, submit pull requests, or suggest new features.


License

MIT License