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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mobe-server

v0.0.9

Published

Point your application to mobe-server to mock out the back end. This is ideal for unit testing the front end of your application using a tool like Selenium.

Downloads

3

Readme

MOBE Build Status

MOBE (/mō-bē /) stands for Mock Out Back End. It is inspired by MSL. This tool allows a user to unit test the front end without relying on a back end, making tests faster and more reliable. It also allows to test API contracts.

Releases

Release 0.0.7

Contributing

Thank you for taking the time to contribute.

MOBE follows the Contributer Code of Conduct. By creating a pull request, an issue, or commenting in the mobe-server repository, you agree to those terms.

If you want to contribute, here's how:

  • Create a GitHub account
  • Submit a ticket in GitHub project
    • I will assign you to the ticket once the ticket is approved.
  • Fork the repository in GitHub
  • Make your changes
  • Test your code
    • npm test
  • Make a pull request
  • Include reference to the ticket
  • After review, the pull request will be merged to the master

All communication will happen within GitHub. Please log defects or enhancements as issues.

Installing MOBE Server

Local install

npm install mobe-server

Global install

npm install -g mobe-server

Starting MOBE Server

If you installed it locally:

./node_modules/msl-server/src/bin/mobe [options]

If you installed it globally:

mobe [options]

Options for MOBE Server:

  • --port => the port that server will be listening on local host, default is 8000.
  • --log => what log level to output to the console, default is info.
    • Options include 'verbose', 'debug', 'info', 'warn', and 'error'.

Example:

mobe --port=8001 --log=warn

API

Mock Response - Structure to respond to a request with mock data

Intercept - Structure to intercept a request to view the request body. Sends a response after the intercept.

Actions

  • Register Mock Response
    • /mobe/response/register
    • Params:
      • host - String
      • port - Integer
      • configuration - JSON with keys:
        • method - String
        • path - String
        • response - String
        • statusCode - String
  • Unregister Mock Response
    • mobe/response/unregister
    • Params:
      • host - String
      • port - Integer
      • configuration - JSON with keys:
        • method - String
        • path - String
  • Unregister all responses
    • /mobe/response/unregister_all
    • Params:
      • host - String
      • port - Integer
  • Register an Intercept
    • /mobe/intercept/register
    • Params:
      • host - String
      • port - Integer
      • configuration - JSON with keys:
        • method - String
        • path - String
        • response - String
        • statusCode - String
  • Get a Request Interception
    • /mobe/intercept/get
    • Params:
      • host - String
      • port - Integer
      • configuration - JSON with keys:
        • method - String
        • path - String
  • Unregister an Intercept
    • /mobe/intercept/unregister
    • Params:
      • host - String
      • port - Integer
      • configuration - JSON with keys:
        • method - String
        • path - String
  • Unregister all Intercepts
    • /mobe/intercept/unregister_all
    • Params:
      • host - String
      • port - Integer

Ruby Client

Include 'mobe-client' in your Gemfile, gem mobe-client, or gem install mobe-client.

License Type

MOBE project is licensed under The MIT License.