Copied example app for javascript