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

@dgreegman/nets

v1.2.0

Published

[![NPM version](https://img.shields.io/npm/v/@dgreegman/nets.svg)](https://www.npmjs.com/package/@dgreegman/nets) [![License](https://img.shields.io/npm/l/@dgreegman/nets.svg)](https://github.com/DGreegman/nets/blob/main/LICENSE)

Readme

NETS - Node.js Express TypeScript/JavaScript Scaffolder

NPM version License

A simple, interactive CLI tool to quickly scaffold a new Node.js project using the Express framework. Get a production-ready setup for either TypeScript or JavaScript in seconds.

Features

  • Interactive Setup: Guides you through the project creation process.
  • Language Choice: Supports both TypeScript and standard JavaScript.
  • Database Integration: Choose between Mongoose, Sequelize, Prisma, or no database at all.
  • Testing Framework: Optionally include Jest for testing.
  • API Documentation: Optionally include Swagger for API documentation.
  • Modern Project Structure: Creates a logical and scalable directory structure (controllers, services, routes, etc.).
  • Optimized Tooling: Comes with ESLint, Prettier, and an optimized tsconfig.json for TypeScript projects.
  • Faster Installation: Automatically detects and uses pnpm or yarn if available, resulting in a faster and more efficient setup.
  • Essential Scripts: package.json is pre-configured with dev, start, build, and test scripts.
  • Automatic .gitignore and .env: Generates essential .gitignore and .env files from the start.
  • User-Friendly Feedback: Displays a loading spinner during dependency installation.

API Documentation with Swagger

NETS can automatically set up Swagger for your project, providing you with interactive API documentation out of the box. When you enable this feature, the following will be configured:

  • Swagger UI: A beautiful, interactive API documentation UI will be available at /api-docs.
  • Swagger JSDoc: The project will be configured to use swagger-jsdoc to generate the OpenAPI specification from JSDoc comments in your code.
  • Sample Documentation: A sample route will be documented to show you how to get started.

Usage

To create a new project, run the following command in your terminal:

Using npx (Recommended for trying it out)

npx @dgreegman/nets

Global Installation (Recommended for frequent use)

# Install once
npm install -g @dgreegman/nets

# Use anywhere
nets

Why Global Installation?

  • ⚡ Faster (no download each time)
  • 🎯 Simpler command (nets instead of npx @dgreegman/nets)
  • 📦 Available offline after first install The tool will then prompt you for the following information:
  1. Project Name: The name of your new application (e.g., my-api).
  2. Language: Your choice of either TypeScript or JavaScript.
  3. Database: Your choice of database integration: Mongoose, Sequelize, Prisma, or None.
  4. Jest: Whether to include Jest for testing.
  5. Swagger: Whether to include Swagger for API documentation.

That's it! The tool will create a new directory with your project name and install all the necessary dependencies.

✔ Dependencies installed with pnpm.
✔ Project my-api is set up and ready to go!

Generated Project Structure

NETS will generate the following directory structure for your new project:

my-api/
├── .env
├── .eslintrc.json
├── .gitignore
├── .prettierrc.json
├── jest.config.js (if Jest is included)
├── package.json
├── prisma/ (if Prisma is selected)
│   └── schema.prisma
├── src/
│   ├── config/
│   │   └── db.ts (or .js)
│   ├── controllers/
│   ├── email/
│   ├── errors/
│   ├── index.ts (or .js)
│   ├── interfaces/
│   ├── middlewares/
│   ├── models/
│   ├── routes/
│   ├── services/
│   └── utils/
└── tsconfig.json (if TypeScript)

Database Integration

NETS supports the following database integrations:

  • Mongoose: A popular ODM for MongoDB.
  • Sequelize: A promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.
  • Prisma: A next-generation ORM for Node.js and TypeScript.

When you select a database, NETS will install the required dependencies and create a configuration file in src/config/db.ts (or .js). You will need to update this file with your database connection details.

Testing with Jest

If you choose to include Jest, NETS will install the required dependencies and create a jest.config.js file in the root of your project. You can then create your test files in a __tests__ directory or with a .test.ts (or .js) extension.

To run your tests, use the following command:

npm test

Environment Variables

NETS uses the dotenv package to load environment variables from a .env file in the root of your project. You can add your environment variables to this file, and they will be available in your application via process.env.

Collaborators

Thanks to all the amazing contributors to this project ❤️

License

This project is licensed under the ISC License. See the LICENSE file for details.