Add connection.js code