Espresso icon indicating copy to clipboard operation
Espresso copied to clipboard

Serverside ressources when espresso server is running

Open hano opened this issue 13 years ago • 2 comments

Wouldn't it be great, to have an folder with stuff in it, like json files, that are accessible when espresso server is running. An Example: Your app wants to use an interface to a server. But that interface is not implemented yet. So you put an future like demo-file of the response in that folder. Now you can pretend to connect to the real server and use your espresso server as host and serverside interface.

hano avatar Jul 21 '11 09:07 hano

That's a nice idea. Sounds like some kind of server-side fixtures (e.g. fixtures for request responses). We will discuss it and then enqueue it in our working queue.

sebastianwerler avatar Jul 21 '11 10:07 sebastianwerler

I think we should define a special folder inside of an application, e.g. 'data'. Any ressources within this folder won't be included in the build process and won't be part of the cache manifest. Espresso will provide this folder as e.g. '127.0.0.1:8000/myApp/data'. So you might put a json file into this folder and can access it by sending a request to this url.

dominiklaubach avatar Jul 21 '11 14:07 dominiklaubach