2.0.0 • Published 1 year ago

@gjuro/my-mock-cli v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

my-mock-cli

Static Badge

Simple mock HTTP API using json config

BREAKING CHANGES

structure changed

{
    "mappings" => "@endpoints" :
        {
            "request" => "@request" : "GET /api/users/1",
            "response": => "@response" {
                "body": => "@body"  {
                    "id": 1,
                    "title": "test 1"
                }
            }
        }
    ]
}

MOCK FILE STRUCTURE AND ATTRIBUTES

detailed documentation

{
    "@endpoints": [
        {
            "@request": "GET /api/users/1",
            "@response": {"id": 1,"title": "user 1"}
        }
    ]
}

FEATURES

USAGE

Install

  npm install -g @gjuro/my-mock-cli

Create default sample files and folders in curent shell folder

  my-mock-cli --init

Start server

  my-mock-cli

goto: http://localhost:3000/api/users/1, you will get

  {"id":1,"title":"test 1"}

EXAMPLES

TODO

TODO - stuff to be done

  • response: conten type
  • response: headers
  • response http status code
  • multipart request
  • static files
  • request| response variables
  • response random variables (num,date,text)
  • response date now +format variable
  • response template x rows , s time da i x može biti random
  • cors
  • upload 1 file
  • upload multiple files
  • get 1 file
    • content disposition
    • from url
    • from loca file
    • base 64
  • SSL
  • ....
2.0.0

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago