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

men-api-scaffold

v1.0.5

Published

A CLI to scaffold a MEN stack API project using ES6 modules.

Readme

men-api-scaffold

A simple CLI tool to scaffold a modern MEN stack (MongoDB, Express, Node.js) API project using ES6 modules.

🚀 Usage

You can use this tool to create a new API project by running:

npx men-api-scaffold my-api

This will create a new folder my-api/ with the full project structure, including all configuration files and dependencies defined.


📁 What you get

  • Express app with ES6 module support
  • MongoDB integration via Mongoose
  • Static file setup and middleware preconfigured
  • .env.example and linting ready
  • Modular folder structure for scalability

📝 Next steps

After generation:

cd my-api
npm install
  • make sure to create .env based on the provided .example or copy it as logs show right before launch.

finally

npm run dev

[!IMPORTANT]

In case you are not using mongoDB in your pc you will get an MongooseServerSelectionError: connect ECONNREFUSED

⚠️ MongoDB Connection Requirements

This scaffold uses MongoDB with Mongoose. To run the project successfully, a valid MongoDB connection must be available.

🧩 1. Use Local MongoDB (default option)

By default, the scaffold expects MongoDB to be running locally at: mongodb://localhost:27017

✅ Steps to run it locally:

  1. Install MongoDB Community Edition:

    • https://www.mongodb.com/try/download/community
  2. Start MongoDB:

    • On Windows (using services):
    net start MongoDB
    

Or manually:

bashmongod

Verify it is running: bashmongo

  • Set the .env file: Create your .env from the example file: bashcp .env.example .env Example content: envMONGO_URI=mongodb://localhost:27017/men-db PORT=4444

🌐 2. Use MongoDB Atlas (cloud)

  • If you don't want to install MongoDB locally, use MongoDB Atlas: ✅ Steps:
  1. Sign up at: https://www.mongodb.com/cloud/atlas

  2. Create a new cluster (Shared Tier is free)

  3. Click "Connect" > "Connect your application", and copy the connection string like: mongodb+srv://:@.mongodb.net/?retryWrites=true&w=majority

  4. Replace , , , and with your actual values.

  5. Paste it into your .env: envMONGO_URI=mongodb+srv://user:[email protected]/my-db PORT=4444


📦 Project structure

The generated project includes:

my-api/
├── bin/
├── lib/
├── models/
├── public/
├── routes/
├── views/
├── app.js
├── .env.example
├── package.json
├── README.md
└── ...

🛠 Maintained by

Roberto Gomez Fabrega
GitHub Repository