Comments (8)
In other words:
is it possible to open a static file structure path in the URL without mentioning it in the config.json?
Maybe: "apimocker/static/folder/index.html"
from apimocker.
@snyoz
Sorry I have been busy with work and traveling. But I should have some time to work on this today. So, I originally intended for apimocker to only return API responses, like JSON or XML. I didn't think it would be useful to return images. Just curious, why do you need it to return static images? I thought images would be served up by the same web/app server that serves your app? Anyway… I think I can open a static path as you describe. I'll try to get that done today or maybe tomorrow. Thanks!
from apimocker.
Thanks for your answer!
The problem is that I've got 387 of images files in 100 different nested in directorys.
My current solution is that I also installed "grunt-contrib-connect" . So I run an additional image server as grunt task to view the static image directory-tree. it works! but it would be more satisfying to run it 'all in one' with your apimocker on the same port. :)
Kind regards!
from apimocker.
@snyoz I just checked in support for this feature. Set "staticDirectory" and "staticPath" in your config.json file. Let me know how that works. Thanks!
from apimocker.
do you mean this way?
I have added this to my config.json:
"app/test": {
"verbs": ["get"],
"staticDirectory":"static/test"
},
from apimocker.
You also need to add "staticPath" and I think both need a leading slash. Path is for the URL you use to access the static directory.
Good luck!
-Greg
On Jul 11, 2014, at 4:39 PM, "Kevin Bacon (Official)" [email protected] wrote:
do you mean this way?
I have added this to my config.json:
"app/test": {
"verbs": ["get"],
"staticDirectory":"static/test"
},—
Reply to this email directly or view it on GitHub.
from apimocker.
Also, not inside the "webservices" section of the config. Should be at the top level. There's a sample on the readme page.
Hope this helps.
-Greg
On Jul 11, 2014, at 4:39 PM, "Kevin Bacon (Official)" [email protected] wrote:
do you mean this way?
I have added this to my config.json:
"app/test": {
"verbs": ["get"],
"staticDirectory":"static/test"
},—
Reply to this email directly or view it on GitHub.
from apimocker.
Awesome! It helps a lot!!!! Great, thank you very much.
from apimocker.
Related Issues (20)
- apimocker has vulnerable dependencies HOT 1
- How to mock form-data requests? HOT 1
- Multiple types params path/queryString, body HOT 1
- Syntax for special characters or blanks HOT 1
- How do I return the request object as the response after adding one key to the request body? HOT 1
- Custom Middleware
- credentials HOT 1
- Is it possible to dump or list all expecations? HOT 1
- Support Parse Server mocking. HOT 3
- How to set paths in cloud foundry ? HOT 1
- 204 response prevent any switchResponses to be executed HOT 1
- Handle multiple query parameters HOT 1
- Incorrect documentation around templating HOT 10
- Switch statement not responding to multiple values for the same key
- Document suggestion HOT 3
- Express deprecated req.param(name) HOT 1
- switch param in path no longer working since 1.0.2 HOT 3
- Make console output more colorful HOT 1
- disabling jsonpath
- "TypeError: jsonPath.eval is not a function" is thrown when `JSONPath` is not installed. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apimocker.