mwaylabs / Espresso

The-M-Projects build tools using node.js.
www.the-m-project.org
Other
84 stars 28 forks source link

Serverside ressources when espresso server is running #25

Open hano opened 12 years ago

hano commented 12 years ago

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.

sebastianwerler commented 12 years ago

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.

dominiklaubach commented 12 years ago

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.