From 44de44ac6a3879c78b7e31d7e460bb0125275237 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Mon, 24 Mar 2014 20:01:39 -0700 Subject: Adding index page to backend with API info. --- src/com/p4square/grow/backend/GrowBackend.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/com/p4square/grow/backend/GrowBackend.java') diff --git a/src/com/p4square/grow/backend/GrowBackend.java b/src/com/p4square/grow/backend/GrowBackend.java index 683c99b..e747a1b 100644 --- a/src/com/p4square/grow/backend/GrowBackend.java +++ b/src/com/p4square/grow/backend/GrowBackend.java @@ -10,8 +10,10 @@ import org.apache.log4j.Logger; import org.restlet.Application; import org.restlet.Component; -import org.restlet.data.Protocol; import org.restlet.Restlet; +import org.restlet.data.Protocol; +import org.restlet.data.Reference; +import org.restlet.resource.Directory; import org.restlet.routing.Router; import com.p4square.grow.config.Config; @@ -107,7 +109,6 @@ public class GrowBackend extends Application Router router = new Router(getContext()); // Account API - router.attach("/accounts", AccountResource.class); router.attach("/accounts/{userId}", AccountResource.class); // Survey API @@ -133,6 +134,8 @@ public class GrowBackend extends Application router.attach("/feed/{topic}/{thread}", ThreadResource.class); //router.attach("/feed/{topic/{thread}/{message}", MessageResource.class); + router.attachDefault(new Directory(getContext(), new Reference(getClass().getResource("apiinfo.html")))); + return router; } -- cgit v1.2.3