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

real-men

v1.1.5

Published

MEN stack API generator

Downloads

46

Readme

real-men.png

MEN stack API generator

License Version

Installation

npm i -g real-men

(if npm is not installed you will need Node.js)

Simple example

men test1

The result would be:

Screen-Shot-2019-05-28-at-3-14-50-PM.png

where each controller (only one in this case) will have the typical CRUD functions:

  • GET: getAllFromItem (gets all documents from a given collection)
  • GET: getOneItem (gets only one, given an id)
  • POST: saveNewItem (saves a new document)
  • PUT: updateItem (updates a document)
  • DELETE: deleteItem (deletes a document)

Specifying entities

Many entities can be specified (being an entity the union controller + model + routes) as long as they're separated by commas with no spaces, for instance:

men test1 -e user,cat,cow,coffee

will generate:

Screen-Shot-2019-05-28-at-3-25-52-PM.png

Attributes specification

For a more specific data structure, a configuration file is needed. Such file must have a json extension and it looks like this:

{
  "entities": {
    "user": {
      "name": "String",
      "email": "String",
      "age": "Number"
    },
    "cat": {
      "isItAJerk": "Boolean",
      "catName": "String"
    },
    "cow": {
      "isItHoly": "Boolean",
      "birthday": "Date"
    },
    "coffee": {
      "isDecaf": "Boolean",
      "hasMilk": "Boolean"
    }
  }
}

and instead of this:

men test1 -e user,cat,cow,coffee

the line would be:

men test1 -e customMapping.json

API tester

The API tester will look different depending on the level of detail specified (being the highest the config file). For instance, the one for men test1 -e user,cat,cow,coffee would be:

Screen-Shot-2019-07-10-at-10-49-54-AM.png

and the one for men test1 -e customMapping.json would look like this (note that some data has been added):

Screen-Shot-2019-07-10-at-10-50-40-AM.png

Notes

  • The default entity name is 'Item' and its model has just a string attribute: data
  • Currently, the API tester does have support for String, Number, Date and Boolean types (based on the moongoose SchemaTypes), any type should be functional with the appropriate settings though
  • The config file attribute types must always be strings ("String", "Number", "[]", etc.)
  • If not given, the default database to connect/create will be <your-proyect-name>_DB, to specify a database use --database or -d
  • The default port to run the server is 5501, change it with --port or -p
  • Use --open or -o to automatically open the broswer and test the API
  • Entity names and attributes must match ^[a-zA-Z_][0-9a-zA-Z_]*$
  • Entity names are automatically capitalized
  • Mongo daemon (mongod) must be running to be able to create/connect to the DB
  • More info with men --help