Skip to content

assassin1717/WireNode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WireNode

A simple API mock app with NodeJS.

Installation

Requires Node.js to run.

Install the dependencies and devDependencies and start the server.

cd WireNode(root folder)
npm install
npm run start

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:1717

How to use

  • Create the resquest and response object like in the example inside the mappings folder
  • Test to see if your request are receiving the expected responses

Object example

{
    "request": {
        "urlPath": "/test",
        "method": "GET",
        "queryParms":{
            "api_key": "UHAIuhishdihAIUhgigsdi"
        }
    },
    "response": {
        "status": 200,
        "jsonBody": {
            "data": [
                {
                    "type": "articles",
                    "id": "1",
                    "attributes": {
                        "title": "JSON:API paints my bikeshed!",
                        "body": "The shortest article. Ever."
                    },
                    "relationships": {
                        "author": {
                            "data": {
                                "id": "42",
                                "type": "people"
                            }
                        }
                    }
                }
            ],
            "included": [
                {
                    "type": "people",
                    "id": "42",
                    "attributes": {
                        "name": "John"
                    }
                }
            ]
        }
    }
}

You can change the host in the config.js file and all the other configurations.

License

MIT

Open Source tool :)

About

A simple API mock app with NodeJS

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors