This article shows how to implement a SharePoint 2013 App using JSOM