On Thu, 15 Aug 2013 14:53:05 GMT, Craig Dillabaugh wrote:

On Thu, 15 Aug 2013 14:20:40 GMT, Craig Dillabaugh wrote:

On Wed, 14 Aug 2013 22:13:11 GMT, Sönke Ludwig wrote:

The Example1API class uses the new @rootPathFromName attribute, which adds a prefix for the API based on its name. In this case that would be "/example1api/" and the complete URL should be (untested) "http://localhost:8080/example1api/some_info/".

You can also run the application with --vv (i.e. "dub -- -vv") to get a list of all registered routes printed - plus a lot of other, less useful, stuff.

This works. Thanks very much.

Craig

A comment about the API and this forum for anyone who may be viewing this through the web forum.

The path above should read "/example1_api/" (notice the underscore). It seems like the web forum strips out the underscore in the path name (although I see it when replying, since all the fancy formatting is omitted.)

Good catch! This is a "feature" of Markdown, probably the best way to write it is in single back-ticks: "/examples1_api/".

Also, the "dub -- -vv" option was great. Would it be OK if I edited the example on GitHub to comment on runnign dub with this option, and on the impact of @rootPathFromName.

Sounds like a good idea. I'll change the route list to use logDiagnostic so that "dub -- -v" is sufficient and all that other debug output disappears.