https://github.com/zerotohero-dev/unreal
mocks stuff
https://github.com/zerotohero-dev/unreal
Last synced: 9 months ago
JSON representation
mocks stuff
- Host: GitHub
- URL: https://github.com/zerotohero-dev/unreal
- Owner: zerotohero-dev
- License: other
- Created: 2015-07-10T21:00:42.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-11T00:36:30.000Z (almost 11 years ago)
- Last Synced: 2024-04-14T11:36:20.966Z (about 2 years ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
.-') _ _ .-') ('-. ('-.
( OO ) )( \( -O ) _( OO) ( OO ).-.
,--. ,--. ,--./ ,--,' ,------. (,------./ . --. / ,--.
| | | | | \ | |\ | /`. ' | .---'| \-. \ | |.-')
| | | .-') | \| | ) | / | | | | .-'-' | | | | OO )
| |_|( OO )| . |/ | |_.' |(| '--.\| |_.' | | |`-' |
| | | `-' /| |\ | | . '.' | .--' | .-. |(| '---.'
(' '-'(_.-' | | \ | | |\ \ | `---.| | | | | |
`-----' `--' `--' `--' '--' `------'`--' `--' `------'
# Unreal
Serves contents of JSON files.
Can be used to mock API responses.
## Why?
I wanted to write some cool es6; and I needed a mock server that I could
customize further when needed.
## Usage
* Clone the project.
* Put your mockup JSON file in a folder (F).
* Rename `config.example` as `config.json`.
* Update `DATA_PATH` on `config.json` to point to the JSON folder (F).
* Update the `urls` section of `config.json` to map to your **JSON** files.
* Run `node index-compiled`
* `http://localhost:8080` will be your mock server. For example visiting
`http://localhost:8080/api/bimbo` will output
`{"lorem":{"some-other":"response"}}` which is the contents of `lorem.json`
which is mapped in `config.example` as `{"/api/bimbo": "lorem.json"}`
That’s all for it now.
More features may come in the future.
## Have Something to Say?
Note that this project is in its early beginning.
Do not expect much from it.
Open an issue to share your comments and suggestions.