auraInit.put("instance", instance);
auraInit.put("token", AuraServlet.getToken());
auraInit.put("host", context.getContextPath());
contextService.startContext(Mode.PROD, Format.HTML, Authentication.AUTHENTICATED, def.getDescriptor());
auraInit.put("context", contextService.getCurrentContext());
jsWriter.append("\n$A.initConfig($A.util.json.resolveRefs(");
Json.serialize(auraInit, jsWriter, context.getJsonSerializationContext());
jsWriter.append("));\n");
} finally {