only compile if javascript files are requested, ensure errors are handled correctly using the standard connect middleware error handling approach.