fake-node-server
v1.0.0
Published
The server with a set of endpoints that could be used for test purposes
Downloads
4
Readme
Fake Server
The server with a set of endpoints that could be used for test purposes.
Cross Origin Resource Sharing (CORS) is enabled by default.
Feel free to add endpoints for your needs.
Run the server
npm install
npm start
Endpoints
You may use GET
, POST
, PUT
or DELETE
method with any of the following endpoints:
Common ones
/delay
Fails within some time due to timeout error./delay/:amount
Ends the request right after passedamount
of milliseconds with empty response.
JSON
/echo/json
Returns empty JSON response./echo/json/:value
Returns passed JSONvalue
./echo/json/:value/:delay
Returns passed JSONvalue
right after specifieddelay
./echo/json/:value/:delay/:status
Returns passed JSONvalue
right after specifieddelay
with a given status.
XML
/echo/xml
Returns empty XML response./echo/xml/:value Returns passed XML
value
./echo/xml/:value/:delay Returns passed XML
value
right after specifieddelay
./echo/xml/:value/:delay/:status
Returns passed XMLvalue
right after specifieddelay
with a given status.
HTML
/echo/html
Returns empty HTML response./echo/html/:value
Returns passed HTMLvalue
./echo/html/:value/:delay Returns passed HTML
value
right after specifieddelay
./echo/html/:value/:delay/:status
Returns passed HTMLvalue
right after specifieddelay
with a given status.