Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/avichalp/bogusapi
- Owner: avichalp
- License: mit
- Created: 2016-02-09T18:57:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-16T17:42:52.000Z (almost 9 years ago)
- Last Synced: 2023-09-02T23:51:35.937Z (about 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 StubHit `localhost:8080/document`
Response that you should get :
`{'message': 'OK'}`
Create any number of stubs by simply inserting approriate data in MongoDB