require
.
for example var sql = require('sql.js');
you need in the sql.js to return an object at the end with module.exports = myobj
;
Example:
module.exports = {
sql_connection: null,
connect: function() {
// connect to db
this.sql_connection = ... ; // code to connect to the db
}
};