Sign inSign up

getshifter/shifter-artifact-helper-mock

By getshifter

•Updated almost 8 years ago

https://github.com/getshifter/shifter-artifact-helper-mock

Image
0

279

getshifter/shifter-artifact-helper-mock repository overview

⁠shifter-artifact-helper-mock

This is the mock server of shifter-artifact-helper plugin The mock server generate these resources.

shifter-artifact-helper-mock

/wp-json/shifter/v1/urls?page=0&limit=x
/wp-json/shifter/v1/urls?page=1&limit=x
/wp-json/shifter/v1/urls?page=2&limit=x
/wp-json/shifter/v1/urls/:name/?page=x&limit=x
/wp-json/shifter/v1/urls/archives/:year/?page=x&limit=x
/wp-json/shifter/v1/urls/archives/:year/:month/?page=x&limit=x
/wp-json/shifter/v1/urls/archives/:year/:month/:day/?page=x&limit=x

In any other resource, the server returns empty json object.

⁠usage

npm install

⁠usage

To return all kind of urls from the server

npm run start

To return 404 Not Found from the server

npm run start404

To return 500 Internal Server Error from the server

npm run start500

⁠endpoint

localhost:3000

⁠Run with Docker

build

$ docker build -t shifter-artifact-helper-mock:latest .

run

$ docker run -it --rm -p 3000:3000 shifter-artifact-helper-mock:latest

with args

$ docker run -it --rm -p 3000:3000 shifter-artifact-helper-mock:latest start404

Tag summary

Content type

Image

Digest

Size

31.2 MB

Last updated

almost 8 years ago

docker pull getshifter/shifter-artifact-helper-mock