staticdeploy / mock-server Goto Github PK
View Code? Open in Web Editor NEWEasy to use, no frills http mock server
License: MIT License
Easy to use, no frills http mock server
License: MIT License
mock-server has not validation on calls that receive.
With #6, it will only validate that the endpoints exists, but could be useful if it validates the parameters
Is there a current way to use Express middleware? For example, .use(express.static(resolve(options.root, '../dist/scripts')))
? This is just an example, but curious how to add arbitrary middleware.
Rename docs/why-use-sd-mock-server.md
-> docs/why-use-mock-server.md
Collect which APIs have been called (and how many times they were called).
When the mock server stops, print a list of all APIs and their metrics, so it's possible to see if there are APIs which have not been called (and potentially remove them).
The looks like a good library. Any reason it is not released to the NPM Registry?
Gitbook open source is no longer being maintained (see GitbookIO/gitbook#1808). Migrate to docusaurus.
It could be interesting to enable a delay only to a specific route to increase the loading phase of an api call.
Now we could add a setTimeout
function to wrap the response.
An interesting improvement could be set a property to the response adding a timeout.
An example to delay the response for 4s could be:
module.exports = function (req, res) {
res.status(200).delay(4000).send({})
}
Instead of specifying a root directory, allow specifying (option --from
?) the name of a npm package that exports a mock-server. For an npm package to export a mock-server means to have a folder mock-server
containing routes.
In new version, @staticdeploy/app-config package is required but is only in dev-dependencies, so it is not installed
Makes impossible to mock resources like .well-known/jwks.json
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.