eggjs/egg-development-stub — explained in plain English
Analysis updated 2026-08-05 · repo last pushed 2018-01-10
Replace a slow database-fetching service with a stub that instantly returns a fake user profile during local development.
Stub out an external API call that is not yet built so you can keep coding the rest of your app.
Override only specific methods of a real service while letting the remaining methods behave normally.
| eggjs/egg-development-stub | abhagsain/bayut-maps-ratings | abhishek-kumar09/who-is-imposter | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2018-01-10 | — | 2021-04-12 |
| Maintenance | Dormant | — | Dormant |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Egg.js project and involves enabling a plugin plus creating a parallel folder structure for stub files.
This project is a tool for developers working with the Egg.js framework. It lets you create "stubs", lightweight stand-ins for parts of your application like services or external calls, so that during local development you can skip slow or complex operations and get immediate, predictable responses. When you're building an app, your code often needs to talk to databases or external services that might be slow, unreliable, or not yet built. This tool solves that by letting you write a fake version of that service that simply returns a fixed, instant response. You drop these fake files into a specific folder in your project, and the tool automatically swaps the real service for your fake one whenever the app runs in a local development environment. The primary audience is developers using Egg.js who want a smoother local coding experience. For example, if you have a service that normally fetches user data from a live database, you could use this to stub it out so it instantly returns a fake user profile instead. This lets you focus on building the visible parts of your app without waiting on the database to respond or needing real data on hand. Setting it up involves enabling a plugin in a local configuration file and creating a parallel folder structure for your stubs. It's designed strictly for non-production environments, it automatically ignores itself when running in production. Beyond simple fixed responses, the tool offers an advanced mode where your fake service can inherit from the real one, allowing you to override only specific methods while letting the rest behave normally. The README is quite sparse and doesn't detail any notable architectural tradeoffs. It mainly serves as a basic instruction manual for where to place files and how to enable the plugin, leaving the broader context of testing strategy to the developer.
A plugin for the Egg.js framework that lets developers create lightweight fake versions of services for local development, so they can get instant predictable responses without relying on slow or unbuilt dependencies.
Mainly JavaScript. The stack also includes JavaScript, Egg.js, Node.js.
Dormant — no commits in 2+ years (last push 2018-01-10).
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.