Edit app.js to work with Java Socket