0.0.2 • Published 10 years ago
unreal v0.0.2
Unreal
Serves contents of JSON files.
Can be used to mock API response.
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.exampleasconfig.json. - Update
DATA_PATHonconfig.jsonto point to the JSON folder (F). - Update the
urlssection ofconfig.jsonto map to your JSON files. - Run
node index-compiled http://localhost:8080will be your mock server. For example visitinghttp://localhost:8080/api/bimbowill output{"lorem":{"some-other":"response"}}which is the contents oflorem.jsonwhich is mapped inconfig.exampleas{"/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.