Accessing the SQLite data directly with JavaScript may not be possible without significant server-side modifications, as JavaScript is really intended more for client-side scripting. PHP would probably be a better language to use for that purpose as PHP is support is already built into Mac OS X, already includes SQLite access methods, and was intended for server-side (rather than client-side) processing. I found the
PHP online manual to be very helpful when I was learning PHP.