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

instant-express

v1.0.1

Published

CLI tool to instantly generate a production-ready Express.js + MongoDB backend with optional JWT authentication, folder structure, and auto dependency installation

Readme


🚀 Quick Start

No installation needed. Just run:

npx instant-express my-project

That's it! Your backend is ready. 🎉


🎬 Demo

$ npx instant-express my-app

🚀 Instant-Express CLI

? Enter port number: 5000
? Include JWT Authentication? Yes
? Run npm install automatically? Yes

📁 Folder created: my-app/
✅ Core files generated!
✅ Auth files generated (User model, controller, routes, middleware)!
✅ package.json created!
✅ .env file created!
📦 Installing dependencies...
✅ Dependencies installed successfully!

🎉 my-app successfully generated!

Next steps:
  cd my-app
  npm run dev

Happy coding! 🚀

✨ Features

| Feature | Description | |---------|-------------| | ⚡ One Command Setup | npx instant-express my-app — full backend ready in seconds | | 🔐 Optional JWT Auth | Signup, Login, Logout with protected routes — choose at runtime | | 🧠 Smart Dependencies | Auth packages (bcryptjs, jsonwebtoken) only install when needed | | 🛡️ DNS Fix Built-in | MongoDB Atlas DNS issues auto-resolved with Google & Cloudflare DNS | | 📦 Auto npm install | Dependencies installed automatically — skip if you prefer manual | | 🗂️ MVC Architecture | Clean folder structure — config, controllers, routes, middlewares, models, services, utils | | 🎯 Interactive CLI | No config files needed — just answer simple prompts | | 📝 Auto-generated files | .env, .env.example, .gitignore, package.json — all ready |


🎯 Generated Project Structure

my-project/
├── config/
│   └── db.js                  # MongoDB connection with DNS fix
├── controllers/
│   └── authController.js      # Signup, Login, Logout (if auth selected)
├── middlewares/
│   └── authMiddleware.js      # JWT token verification (if auth selected)
├── models/
│   └── User.js                # User schema with bcrypt (if auth selected)
├── routes/
│   └── authRoutes.js          # Auth API routes (if auth selected)
├── services/                  # Business logic (empty — ready for you)
├── utils/                     # Helper functions (empty — ready for you)
├── app.js                     # Express app setup with middlewares
├── server.js                  # Server entry point
├── .env                       # Environment variables (auto-generated)
├── .env.example               # Environment template for reference
├── .gitignore                 # Git ignore rules
└── package.json               # Project config with all dependencies

⚙️ CLI Options

| Prompt | Description | Default | |--------|-------------|---------| | Port number | Server will run on this port | 5000 | | JWT Authentication | Include signup/login/logout with JWT | Yes | | Auto npm install | Install dependencies automatically | Yes |


🛡️ MongoDB DNS Fix (Built-in)

Many developers face querySrv ESERVFAIL or ENOTFOUND errors when connecting to MongoDB Atlas — especially on certain ISPs.

instant-express automatically configures reliable DNS resolvers in the generated db.js:

import dns from 'dns';
dns.setServers(['1.1.1.1', '8.8.8.8']); // Cloudflare + Google DNS

No more connection issues. It just works. ✅


🚀 After Generation

cd my-project
npm run dev

Output:

✅ MongoDB Connected: localhost
🚀 Server running on port 5000

API Endpoints (if auth selected)

| Method | Endpoint | Description | |--------|----------|-------------| | POST | /api/auth/signup | Register a new user | | POST | /api/auth/login | Login and get JWT token | | POST | /api/auth/logout | Logout (protected route) |


🤝 Contributing

Contributions, issues and feature requests are welcome!

  1. Fork the repo
  2. Create your branch (git checkout -b feature/awesome-feature)
  3. Commit changes (git commit -m 'Add awesome feature')
  4. Push (git push origin feature/awesome-feature)
  5. Open a Pull Request

📄 License

MIT © Prashant