Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/avichalp/bogusapi

Quick and easy way to create stubs.
https://github.com/avichalp/bogusapi

Last synced: 4 days ago
JSON representation

Quick and easy way to create stubs.

Awesome Lists containing this project

README

        

# BogusAPI
Quick and easy way to create stubs.

#### Usage

1. `git clone [email protected]:avichalp/BogusAPI.git`
2. `npm install pacakage.json`
3. `node server.js`

#### Using MongoDB

1. Create a database by the name of `dev`
2. Create a collection called `Response`
3. set environment variable by issuing following command
`export MONGO_LOCAL_URI=` for exmaple:
`export MONGO_LOCAL_URI=mongodb://localhost:27017/dev`
4. Insert your dummy response like :

```
db.Response.insert({
url: '/document',
method: 'GET',
response: {'message': 'OK'}
})
```

#### Using Stub

Hit `localhost:8080/document`
Response that you should get :
`{'message': 'OK'}`

Create any number of stubs by simply inserting approriate data in MongoDB