Update app.js

Add support for both outbound & twoway