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

go-mokapi

v0.30.1

Published

Easy and flexible API mocking

Downloads

777

Readme

🚀 Overview

Mokapi is an open-source tool that helps Agile, DevOps, and Continuous Deployment teams design, test, and validate APIs before implementation. It enables rapid prototyping of scenarios—like delayed responses, failures, or edge cases—without needing a live backend. By simulating real-world conditions early, Mokapi improves API quality and reduces the risk of bugs in production.

✨ Features

  • Multiple Protocol support: HTTP, HTTPS, Apache Kafka, SMTP, LDAP
  • Everything as Code: Reusing, version control, consistency and integrate mocks with your CI/CD.
  • An embedded JavaScript engine to control everything - status, headers, delays, errors or other edge cases.
  • Patch Configuration changes for mocking needs, rather than changing the original contract
  • Multiple Provider support: File, HTTP, GIT, NPM to gather configurations and scripts.
  • Dashboard to see what's going on.

🔧 Spin Up Mokapi

Install and start Mokapi using one of the following methods. Replace the URL with your own OpenAPI or AsyncAPI specification.

Windows

choco install mokapi
mokapi https://petstore31.swagger.io/api/v31/openapi.json

MacOS

brew tap marle3003/tap 
brew install mokapi
mokapi https://petstore31.swagger.io/api/v31/openapi.json

Docker

docker run -p 80:80 -p 8080:8080 mokapi/mokapi:latest https://petstore31.swagger.io/api/v31/openapi.json

🎯 Hit Your First Mock

Once Mokapi is running, you can make requests to your mocked API like so:

curl http://localhost/api/v31/pet/2 -H 'Accept: application/json'

🧩 Customize Your Mock with JavaScript

Mokapi makes it simple to control responses using embedded JavaScript.

For example, you can dynamically change the response based on query parameters or headers:

import { on } from 'mokapi';

export default function() {
    on('http', (request, response): boolean => {
        switch (request.path.petId) {
            case 2:
                response.data.name = 'Betty';
                return true;
            case 9:
                response.statusCode = 404;
        }
        return false;
    });
}

🖥️ Dashboard

Mokapi’s dashboard lets you visualize your mock APIs. View requests and responses in real-time, generate and validate sample data for testing.

🧪 Learn by Example

Explore tutorials that walk you through mocking different protocols and scenarios:

More examples are available on mokapi.io/docs/resources

📚 Documentation

☕ Support

If you find Mokapi helpful, consider supporting the project:

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.