Reset pouch for GPII development config

Li, Cindy cli at
Mon Aug 29 20:56:31 UTC 2016

Hi Tony,

As we discussed in today’s pouch meeting, I’m adding a http request handler for resetting pouch to its initial state when GPII runs in the development mode and the pouch DB is used as the data storage for the authorization server.

My thought is to add a request handler of /reset-pouch at the component level of “”. Speaking in code, this component sits at

So, i’m learning gpii-express to understand how to add a request handler with it. My experiment so far, which is not very successful:

This resetHandler component is distributed to “” at line 55.

The issue is the actual reset handler at line 85 is not hooked up.

Could you shed a light on how to connect “” and “”? Let me know if I’m using wrong components at all. Thanks.

The other thing I’d like to discuss is that, in the meeting we were talking about adding a createOnEvent on the pouchHarness and fire that event at the reset to trigger it to recreate. I wonder if we could do it by directly calling initDBs() once the clean up is finished since initDb() and cleanUp() are from the same component ( API, less destructive and hopefully not less cleaner. :)



More information about the fluid-work mailing list