/snippets/Taffy/Application cfc-tag.xml
XML | 51 lines | 44 code | 7 blank | 0 comment | 0 complexity | a8975e9bd0fb127847c7a937c195999a MD5 | raw file
1<?xml version="1.0" encoding="utf-8"?> 2<snippet filetemplate="false" extension=""> 3<name>Application cfc-tag</name> 4<help>Creates an Application.cfc skeleton for a Taffy API using cfml tags</help> 5<starttext><![CDATA[<cfcomponent extends="taffy.core.api"> 6 7 <cfset this.name = "]]></starttext> 8<endtext><![CDATA[" /> 9 10 <cfset variables.framework = { 11 reloadKey = "reload" 12 ,reloadPassword = "true" 13 ,reloadOnEveryRequest = false 14 ,defaultRepresentationClass = "taffy.core.nativeJsonRepresentation" 15 ,dashboardKey = "dashboard" 16 ,disableDashboard = false 17 ,unhandledPaths = "/flex2gateway" 18 ,allowCrossDomain = false 19 ,globalHeaders = structNew() 20 ,debugKey = "debug" 21 ,returnExceptionsAsJson = true 22 ,exceptionLogAdapter = "taffy.bonus.LogToEmail" 23 ,exceptionLogAdapterConfig = { 24 emailFrom = "api-error@yourdomain.com" 25 ,emailTo = "you@yourdomain.com" 26 ,emailSubj = "Exception Trapped in API" 27 ,emailType = "html" 28 } 29 ,beanFactory = "" 30 } /> 31 32 33 <cffunction name="onApplicationStart"> 34 <cfreturn super.onApplicationStart() /> 35 </cffunction> 36 37 <cffunction name="onRequestStart"> 38 <cfreturn super.onRequestStart() /> 39 </cffunction> 40 41 <cffunction name="onTaffyRequest"> 42 <cfargument name="verb" /> 43 <cfargument name="cfc" /> 44 <cfargument name="requestArguments" /> 45 <cfargument name="mimeExt" /> 46 <cfargument name="headers" /> 47 <cfargument name="methodMetadata" /> 48 </cffunction> 49 50</cfcomponent>]]></endtext> 51</snippet>