This should be 
 var communityService = new CommunityService({ endpoint: "smartcloud" });