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

create-nodeapi-backend

v1.6.3

Published

A powerful Node.js backend boilerplate with Express, MongoDB, Firebase, JWT auth, Nodemailer, cron jobs, input validation (Joi), and serverless support for Vercel. Scaffold a full-featured API backend in seconds.

Readme

create-nodeapi-backend

A simple boilerplate for quickly setting up a Node.js API with Express, MongoDB, JWT authentication, and more. This tool will help you generate a fully functional backend with minimal configuration.

Features

  • Express.js: RESTful API with Express for handling routes and middleware.
  • MongoDB: Integration with MongoDB using Mongoose for database management.
  • JWT Authentication: User authentication using JSON Web Tokens (JWT).
  • Nodemailer: Send emails via SMTP with Nodemailer.
  • Firebase Integration: Firebase setup for cloud functions and storage.
  • Node-cron: Task scheduling with cron jobs.
  • Google OAuth: Sign in with Google using OAuth 2.0.
  • Serverless Support: Preconfigured for deployment on Vercel or any serverless platform.
  • Validation: Using Joi for input validation.

How to Install

  1. Create a New Project:

    To use this boilerplate, simply run the following command:

    npx create-nodeapi-backend@latest

    This will automatically generate the project in a new directory and set up all necessary dependencies for you.

  2. Navigate to the Project Folder:

    Once the project has been created, navigate to the newly created folder:

    cd your-project-folder

    ✅ Do not run npm install — dependencies are already installed during setup.

  3. Setup Environment

    Before running the application, make sure to set up your environment variables.

    Copy the .env.sample file to .env:

    cp .env.sample .env

    Open the .env file and update the necessary fields with your credentials.

Example .env:

    JWT_SECRET=1111111111111111scscsdcsdc
    JWT_ACCESS_EXPIRATION_MINUTES=4200
    JWT_REFRESH_EXPIRATION_MINUTES=800
    NODE_ENV=dev

    PORT=3010
    SALT=10

    MONGODB_USERNAME=username
    MONGODB_PASSWORD=password
    MONGODB_DATABASE=dbstore
    MONGODB_URL=databaseurl

    ORIGIN=

    SMTP_SERVICE=gmail
    SMTP_MAIL=Mmail.com
    SMTP_PASSWORD=password
    EMAIL_FROM=me.com

    API_KEY=a
    AUTH_DOMAIN=a
    DATABASE_URL=a
    PROJECT_ID=a
    STORAGE_BUCKET=a
    MESSAGING_SENDER_ID=a
    APP_ID=a
    MEASUREMENT_ID=a

    SERVER_ORIGIN=localhost:3010
    FRONTEND_ORIGIN=localhost:3000

    GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
    GOOGLE_CLIENT_SECRET=your_client_secret
    GOOGLE_CLIENT_URI=/v1/googleOauth/google/callback

How to Run in Development

Start the Development Server:

For local development, you can start the server using nodemon for automatic restarts:

npm run dev

Once the server is running, you can access your API at:

http://localhost:3010

or any of your specified open port

🔐 Google OAuth Endpoint

Use the following route to initiate Google OAuth login:

http://localhost:3010/v1/googleOauth/google

This will redirect the user to sign in via their Google account.

How to Run in Production

  1. Build the Application:

    npm run build
  2. Start the Production Server:

    npm start

    Ensure your .env values are configured for the production environment.


🚀 Deploy to Vercel (Optional)

To deploy to Vercel, simply:

  1. Push your project to a GitHub repository.
  2. Go to Vercel and connect your GitHub account.
  3. Select the repository and follow the prompts.

Vercel will automatically detect your Node.js setup and deploy your project with minimal configuration.

Or deploy via CLI:

vercel --prod

License

MIT License. See the LICENSE file for details.