Simple HTTP server for Cordova development

2014-07-28
JavaScript/ NodeJS

The advantage of mobile app development using Cordova is that you code in familiar web technologies (HTML/CSS/JS) which means that you can just open up a browser and get pretty far along to the end product. The problem with running directly from the file system without a web server is that there are times where you’ll run into permissions errors. This is the case when loading templates from files. Although you could use Visual Studio and it’s dev server Cassini, in most cases it’s overkill. I prefer Sublime for developing non-C# code and I found that http-server running from Node JS is perfect for local dev testing.

>npm install http-server -g

then from the root project path >http-server

Done.

PS: If you need to turn off caching then… >http-server -c-1


Comments: