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

es6-swagger-boilerplate-init

v0.0.9

Published

A simple cli for es6 node swagger boilerplate

Readme

Lean Boilerplate

A simple cli to scaffold your Node JS app fast for REST API's, Shopify Apps, Machine Learning and AI.

Installation

npm install -g es6-swagger-boilerplate-init

Getting Started

After installing the package as a global executable. You will be able to use "Boilerplate" command to generate new boilerplate.

$~ es6-swagger-boilerplate

Boilerplate Structure

A basic User Controller and Model has already been made with it collection schema for mongodb with some examples of the validations.

The boilerplate uses lang files for the storage of static data and mail structures to be used in the API.

JsonWebToken and Nodemailer integration has also been made using the helpers file integration.

├── controllers
|    ├── common.js
|    ├── content.js
|    ├── index.js
|    └── user.js
├── models
|    ├── content.js
|    ├── device.js
|    ├── index.js
|    └── users.js
├── services
|    ├── common.services.js
├── app.js
├── routes
│   └── index.js
├── bin
│   └── www
├── package.json
├── package-lock.json
└── public
    └── css
       └── style.css

Preinstalled Packages

  • axios
  • cors*
  • dotenv*
  • jsonwebtoken*
  • lodash
  • mongodb*
  • mongoose*
  • mongoose-beautiful-unique-validation*
  • mongoose-validator*
  • multer
  • nodemailer (*)
  • randomstring
  • express-swagger-generator (*)(dev)

(*) Indicates that the package has been integrated with helpers files for plug and play usage. (dev) Indicates its a Developer Dependency

Environment Variables

A predefined .env.example file is present in the root of the boilerplate.

The variables are being used throughout the boilerplate and new variables can be added to it and can be accessed anywhere in the boilerplate using process.env.VARIABLE_NAME

Use the command below to copy the .env.example to a new .env file which the boilerplate will use.

cp .env.example .env

Contents of the .env

MONGO_URL=mongodb://localhost:27017/es6nodeswagger

SWAGGER_TITLE=NodeJS API Boilerplate
SWAGGER_DESCRIPTION=NodeJS API Boilerplate - Sample API Sandbox
SWAGGER_VERSION=1.0.1
SWAGGER_API_HOST=localhost:3000

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_SSL=tls
SMTP_USER=
SMTP_PASS=

JWT_KEY=tHisAvErYsECuReKeY
JWT_AUDIENCE=NoDeGeNeRaToR
JWT_EXPIRY=10h

PORT=3000

Swagger Integration

Swagger has been integrated as a middleware in the boilerplate.

The documentation will be available at

http://SWAGGER_API_HOST/api-docs

Documentation will be generated automatically by making comments over the methods in the controller files.

Example can be found in app > controllers > UserController.js

Author

Laxman Singh