You can try: "ewsjs is a built-in web server inside your browser. When developing applications based on Ajax and single-page applications, it is often difficult to test these applications until the web server is installed. (...)
EWS provides an embedded web server that accesses your Ajax application as if it were coming from a server. You can use any logic and fully test your Ajax application in a browser without starting the server.
EWS supports several key functions: Register handlers for any path, Register handlers for parameterized paths (for example, Sinatra routes), Register handlers for automatic (when no other handler matches), Rewrite one path to another (for example, in Apache or nginx) , asynchronous (accurately mimicking true ajax calls) "
on https://github.com/deitch/ewsjs
Panait valentin
source share