Can anyone tell me what’s the best way to test JavaScript code (particularly linking it to a data file e.g. csv or Json) without it being in a server (i.e. from desktop). I’d like to create and test the JS on my machine before deploying it to the work intranet. Not had much experience with running server on laptop so would like to avoid this if possible.
Can anyone tell me what’s the best way to test JavaScript code (particularly linking
Share
Running a webserver on your desktop really is the best solution for this, since ajax calls are not allowed for local files.
You could look into xampp, or just fire up your IIS to run your own webserver. xampp is probably a bit easier if you have no experience with web servers what so ever.
Alternatively, an IDE might provide an ad hoc webserver. Visual studio express for example uses a built in development server that alows you to serve your files, some experience with this IDE is obviously also required.
If all this doesn’t work you can always try a sandbox service like http://jsfiddle.net/
A fully fledged and free online IDE to develop/test/deploy your code can be found at Cloud9